@@ -415,8 +415,8 @@ private static class ProxyClient implements NotificationListener {
415415
416416 private ConnectionState connectionState = ConnectionState .DISCONNECTED ;
417417 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 ;
420420 private LocalVirtualMachine lvm ;
421421 private JMXServiceURL jmxUrl = null ;
422422 private Application app ;
@@ -469,9 +469,9 @@ private ProxyClient(JmxModelImpl model, JMXServiceURL url, Application app,
469469 this .envProvider = envProvider ;
470470 }
471471
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 ;
475475 }
476476
477477 boolean hasSSLStubCheck () {
@@ -551,9 +551,8 @@ private void tryConnect() throws IOException {
551551 Map <String , Object > env = new HashMap ();
552552 if (envProvider != null )
553553 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 ) });
557556
558557 if (!insecure && mode != MODE_LOCAL && env .get (JMXConnector .CREDENTIALS ) != null ) {
559558 env .put ("jmx.remote.x.check.stub" , "true" ); // NOI18N
0 commit comments