6886058: JNDI LDAP InitialLdapContext SECURITY_CREDENTIALS byte[] can be corrupted, then LDAP referral fails
authorweijun
Mon, 07 Dec 2009 15:29:44 +0800
changeset 4349 c72a4e2ec170
parent 4348 5b1eb97d243a
child 4350 2a593a20d962
child 4351 c6b75a422eb8
6886058: JNDI LDAP InitialLdapContext SECURITY_CREDENTIALS byte[] can be corrupted, then LDAP referral fails Reviewed-by: vinnie, xuelei
jdk/src/share/classes/javax/naming/InitialContext.java
jdk/src/share/classes/javax/naming/directory/InitialDirContext.java
jdk/src/share/classes/javax/naming/ldap/InitialLdapContext.java
--- 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