[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [JLDAP] Casting error in com.novell.ldap.LDAPSearchConstraints (ITS#2688)

  Thanks for bringing this to our attention.The bug is fixed now  is
checked in . Can you colse the ITS please.


>>> <gelgey@wedgetail.com> 8/19/2003 11:09:18 AM >>>
Full_Name: Geoffrey Elgey
Version: JLDAP
OS: Linux
URL: ftp://ftp.openldap.org/incoming/ 
Submission from: (NULL) (

The com.novell.ldap.LDAPSearchConstraints class has a casting error in
one of
the constructors when cloning. 

The object being cloned is of type LDAPControl[], but the cast is
rather than (LDAPControl[]).

See patch for suggested fix:

@@ -116,7 +116,7 @@
                     cons.getReferralHandler(), cons.getHopLimit());
         LDAPControl[] lsc = cons.getControls();
         if( lsc != null) {
-            super.setControls((LDAPControl)lsc.clone());
+            super.setControls((LDAPControl[])lsc.clone());
         Hashtable lp = cons.getProperties();
         if( lp != null) {