You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2004/11/05 04:25:09 UTC

svn commit: rev 56644 - geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting

Author: ammulder
Date: Thu Nov  4 19:25:09 2004
New Revision: 56644

Modified:
   geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting/Credentials.java
Log:
Don't blow up on null password (JIRA 439)


Modified: geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting/Credentials.java
==============================================================================
--- geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting/Credentials.java	(original)
+++ geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting/Credentials.java	Thu Nov  4 19:25:09 2004
@@ -35,7 +35,7 @@
 
     public Credentials(String username, String password) {
         this.username = username;
-        this.password = password.toCharArray();
+        this.password = password == null ? null : password.toCharArray();
     }
 
     public void handle(Callback[] callbacks) throws UnsupportedCallbackException {
@@ -54,6 +54,8 @@
     }
 
     public void clear() {
-        Arrays.fill(password, '\0');
+        if(password != null) {
+            Arrays.fill(password, '\0');
+        }
     }
 }