geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: rev 56644 - geronimo/trunk/modules/jmx-remoting/src/java/org/apache/geronimo/jmxremoting
Date Fri, 05 Nov 2004 03:25:09 GMT
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');
+        }
     }
 }

Mime
View raw message