changeset 1954:17be46c2f853

6886058: JNDI LDAP InitialLdapContext SECURITY_CREDENTIALS byte[] can be corrupted, then LDAP referral fails Reviewed-by: vinnie, xuelei
author weijun
date Mon, 07 Dec 2009 15:29:44 +0800
parents 0f494453cd0a
children 327adb1c2224 c68f6b6b47fd
files src/share/classes/javax/naming/InitialContext.java src/share/classes/javax/naming/directory/InitialDirContext.java src/share/classes/javax/naming/ldap/InitialLdapContext.java
diffstat 3 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/naming/InitialContext.java	Mon Dec 07 15:27:29 2009 +0800
+++ b/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/src/share/classes/javax/naming/directory/InitialDirContext.java	Mon Dec 07 15:27:29 2009 +0800
+++ b/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/src/share/classes/javax/naming/ldap/InitialLdapContext.java	Mon Dec 07 15:27:29 2009 +0800
+++ b/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