6886058: JNDI LDAP InitialLdapContext SECURITY_CREDENTIALS byte[] can be corrupted, then LDAP referral fails
Reviewed-by: vinnie, xuelei
--- a/jdk/src/share/classes/javax/naming/InitialContext.java Mon Dec 07 15:27:29 2009 +0800
+++ b/jdk/src/share/classes/javax/naming/InitialContext.java Mon Dec 07 15:29:44 2009 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2009 Sun Microsystems, Inc. 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
@@ -198,6 +198,8 @@
*
* <p> This constructor will not modify <tt>environment</tt>
* or save a reference to it, but may save a clone.
+ * Caller should not modify mutable keys and values in
+ * <tt>environment</tt> after it has been passed to the constructor.
*
* @param environment
* environment used to create the initial context.
--- a/jdk/src/share/classes/javax/naming/directory/InitialDirContext.java Mon Dec 07 15:27:29 2009 +0800
+++ b/jdk/src/share/classes/javax/naming/directory/InitialDirContext.java Mon Dec 07 15:29:44 2009 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2009 Sun Microsystems, Inc. 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
@@ -86,6 +86,8 @@
*
* <p> This constructor will not modify <tt>environment</tt>
* or save a reference to it, but may save a clone.
+ * Caller should not modify mutable keys and values in
+ * <tt>environment</tt> after it has been passed to the constructor.
*
* @param environment
* environment used to create the initial DirContext.
--- a/jdk/src/share/classes/javax/naming/ldap/InitialLdapContext.java Mon Dec 07 15:27:29 2009 +0800
+++ b/jdk/src/share/classes/javax/naming/ldap/InitialLdapContext.java Mon Dec 07 15:29:44 2009 +0800
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2009 Sun Microsystems, Inc. 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
@@ -110,6 +110,8 @@
*
* <p> This constructor will not modify its parameters or
* save references to them, but may save a clone or copy.
+ * Caller should not modify mutable keys and values in
+ * <tt>environment</tt> after it has been passed to the constructor.
*
* <p> <tt>connCtls</tt> is used as the underlying context instance's
* connection request controls. See the class description