directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r540956 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
Date Wed, 23 May 2007 13:59:03 GMT
Author: pamarcelot
Date: Wed May 23 06:58:59 2007
New Revision: 540956

URL: http://svn.apache.org/viewvc?view=rev&rev=540956
Log:
Fixed DIRSERVER-941 (ClassCastException raised when unbinding from LDAP Studio).

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java?view=diff&rev=540956&r1=540955&r2=540956
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
Wed May 23 06:58:59 2007
@@ -184,9 +184,18 @@
      */
     public void ldapUnbind() throws NamingException
     {
-        String bindDn = ( String ) getEnvironment().get( Context.SECURITY_PRINCIPAL );
+        Object dn = getEnvironment().get( Context.SECURITY_PRINCIPAL );;
         
-        super.getNexusProxy().unbind( new UnbindOperationContext( new LdapDN( bindDn ) )
);
+        if ( dn instanceof LdapDN )
+        {
+            super.getNexusProxy().unbind( new UnbindOperationContext( ( LdapDN ) dn ) );
+        }
+        else
+        {
+            String bindDn = ( String ) dn;
+            
+            super.getNexusProxy().unbind( new UnbindOperationContext( new LdapDN( bindDn
) ) );
+        }
     }
 
 



Mime
View raw message