src/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -55,11 +55,11 @@
         authenticationID = principal;
         authRealm = realm;
         if (cred instanceof String) {
             passwd = ((String)cred).toCharArray();
         } else if (cred instanceof char[]) {
-            passwd = (char[])((char[])cred).clone();
+            passwd = ((char[])cred).clone();
         } else if (cred != null) {
             // assume UTF-8 encoding
             String orig = new String((byte[])cred, "UTF8");
             passwd = orig.toCharArray();
         }