@@ -415,8 +415,8 @@ private static class ProxyClient implements NotificationListener {
415
415
416
416
private ConnectionState connectionState = ConnectionState .DISCONNECTED ;
417
417
private volatile boolean isDead = true ;
418
- private String userName = null ;
419
- private String password = null ;
418
+ private String user = null ;
419
+ private char [] pword = null ;
420
420
private LocalVirtualMachine lvm ;
421
421
private JMXServiceURL jmxUrl = null ;
422
422
private Application app ;
@@ -469,9 +469,9 @@ private ProxyClient(JmxModelImpl model, JMXServiceURL url, Application app,
469
469
this .envProvider = envProvider ;
470
470
}
471
471
472
- public void setCredentials (String userName , String password ) {
473
- this .userName = userName ;
474
- this .password = password ;
472
+ public void setCredentials (String user , char [] pword ) {
473
+ this .user = user ;
474
+ this .pword = pword ;
475
475
}
476
476
477
477
boolean hasSSLStubCheck () {
@@ -551,9 +551,8 @@ private void tryConnect() throws IOException {
551
551
Map <String , Object > env = new HashMap ();
552
552
if (envProvider != null )
553
553
env .putAll (envProvider .getEnvironment (app , app .getStorage ()));
554
- if (userName != null || password != null )
555
- env .put (JMXConnector .CREDENTIALS ,
556
- new String [] { userName , password });
554
+ if (user != null || pword != null )
555
+ env .put (JMXConnector .CREDENTIALS , new String [] { user , new String (pword ) });
557
556
558
557
if (!insecure && mode != MODE_LOCAL && env .get (JMXConnector .CREDENTIALS ) != null ) {
559
558
env .put ("jmx.remote.x.check.stub" , "true" ); // NOI18N
0 commit comments