directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1331395 - /directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Date Fri, 27 Apr 2012 12:48:11 GMT
Author: pamarcelot
Date: Fri Apr 27 12:48:11 2012
New Revision: 1331395

URL: http://svn.apache.org/viewvc?rev=1331395&view=rev
Log:
Fix for DIRSTUDIO-808 ("Update existing entries" checkbox in "LDIF Import" wizard fails to
work with the Apache Directory LDAP API).

Modified:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java?rev=1331395&r1=1331394&r2=1331395&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Fri Apr 27 12:48:11 2012
@@ -27,6 +27,7 @@ import java.util.HashMap;
 import java.util.List;
 
 import javax.naming.ContextNotEmptyException;
+import javax.naming.NameAlreadyBoundException;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
@@ -1255,6 +1256,10 @@ public class DirectoryApiConnectionWrapp
                 {
                     throw new ContextNotEmptyException( ldapResult.getDiagnosticMessage()
);
                 }
+                else if ( ResultCodeEnum.ENTRY_ALREADY_EXISTS.equals( ldapResult.getResultCode()
) )
+                {
+                    throw new NameAlreadyBoundException( ldapResult.getDiagnosticMessage()
);
+                }
                 // Different from SUCCESS, we throw a generic exception
                 else if ( !ResultCodeEnum.SUCCESS.equals( ldapResult.getResultCode() ) )
                 {



Mime
View raw message