directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r924095 - in /directory/apacheds/trunk/protocol-ldap/src: main/java/org/apache/directory/server/ldap/ main/java/org/apache/directory/server/ldap/handlers/ main/java/org/apache/directory/server/ldap/handlers/bind/ main/java/org/apache/direct...
Date Wed, 17 Mar 2010 02:04:08 GMT
Author: elecharny
Date: Wed Mar 17 02:04:07 2010
New Revision: 924095

URL: http://svn.apache.org/viewvc?rev=924095&view=rev
Log:
Fixed the exceptions

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaPeerConfiguration.java
    directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
Wed Mar 17 02:04:07 2010
@@ -580,7 +580,7 @@ public class LdapServer extends Director
         {
             String msg = I18n.err( I18n.ERR_171, transport.getPort() );
             LdapConfigurationException lce = new LdapConfigurationException( msg );
-            lce.setRootCause( e );
+            lce.setCause( e );
             LOG.error( msg, e );
             throw lce;
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
Wed Mar 17 02:04:07 2010
@@ -22,8 +22,6 @@ package org.apache.directory.server.ldap
 
 import java.util.Map;
 
-import javax.naming.Name;
-import javax.naming.NameNotFoundException;
 import javax.security.sasl.SaslException;
 import javax.security.sasl.SaslServer;
 
@@ -39,6 +37,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.SaslConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -137,7 +136,7 @@ public class BindHandler extends LdapReq
             {
                 principalEntry = getLdapServer().getDirectoryService().getAdminSession().lookup(
bindRequest.getName() );
             }
-            catch ( NameNotFoundException e )
+            catch ( LdapException le )
             {
                 // this is OK
             }
@@ -221,18 +220,18 @@ public class BindHandler extends LdapReq
                 msg += "\n\nBindRequest = \n" + bindRequest.toString();
             }
 
-            Name name = null;
+            DN dn = null;
 
             if ( e instanceof LdapAuthenticationException )
             {
-                name = ( ( LdapAuthenticationException ) e ).getResolvedName();
+                dn = ( ( LdapAuthenticationException ) e ).getResolvedDn();
             }
 
-            if ( ( name != null )
+            if ( ( dn != null )
                 && ( ( code == ResultCodeEnum.NO_SUCH_OBJECT ) || ( code == ResultCodeEnum.ALIAS_PROBLEM
)
                     || ( code == ResultCodeEnum.INVALID_DN_SYNTAX ) || ( code == ResultCodeEnum.ALIAS_DEREFERENCING_PROBLEM
) ) )
             {
-                result.setMatchedDn( new DN( name ) );
+                result.setMatchedDn( dn );
             }
 
             result.setErrorMessage( msg );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java
Wed Mar 17 02:04:07 2010
@@ -20,14 +20,12 @@
 package org.apache.directory.server.ldap.handlers;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.extended.StartTlsHandler;
-import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapOperationException;
 import org.apache.directory.shared.ldap.exception.LdapReferralException;
 import org.apache.directory.shared.ldap.message.BindRequestImpl;
 import org.apache.directory.shared.ldap.message.BindResponseImpl;
@@ -245,9 +243,9 @@ public abstract class LdapRequestHandler
          * Set the result code or guess the best option.
          */
         ResultCodeEnum code;
-        if ( e instanceof LdapException )
+        if ( e instanceof LdapOperationException )
         {
-            code = ( ( LdapException ) e ).getResultCode();
+            code = ( ( LdapOperationException ) e ).getResultCode();
         }
         else
         {
@@ -272,9 +270,9 @@ public abstract class LdapRequestHandler
         
         result.setErrorMessage( msg );
 
-        if ( e instanceof NamingException )
+        if ( e instanceof LdapOperationException )
         {
-            NamingException ne = ( NamingException ) e;
+            LdapOperationException ne = ( LdapOperationException ) e;
 
             // Add the matchedDN if necessary
             boolean setMatchedDn = 
@@ -283,9 +281,9 @@ public abstract class LdapRequestHandler
                 code == ResultCodeEnum.INVALID_DN_SYNTAX          || 
                 code == ResultCodeEnum.ALIAS_DEREFERENCING_PROBLEM;
             
-            if ( ( ne.getResolvedName() != null ) && setMatchedDn )
+            if ( ( ne.getResolvedDn() != null ) && setMatchedDn )
             {
-                result.setMatchedDn( ( DN ) ne.getResolvedName() );
+                result.setMatchedDn( ( DN ) ne.getResolvedDn() );
             }
             
             // Add the referrals if necessary

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
Wed Mar 17 02:04:07 2010
@@ -20,10 +20,6 @@
 package org.apache.directory.server.ldap.handlers;
 
 
-import javax.naming.InvalidNameException;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.i18n.I18n;
@@ -33,6 +29,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.exception.LdapOperationException;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
@@ -136,7 +134,7 @@ public abstract class ReferralAwareReque
         {
             dn.remove( dn.size() - 1 );
         }
-        catch ( InvalidNameException e2 )
+        catch ( LdapInvalidDnException e2 )
         {
             // never thrown
         }
@@ -156,7 +154,7 @@ public abstract class ReferralAwareReque
 
                 dn.remove( dn.size() - 1 );
             }
-            catch ( NameNotFoundException e )
+            catch ( LdapException e )
             {
                 LOG.debug( "Entry for {} not found.", dn );
 
@@ -165,7 +163,7 @@ public abstract class ReferralAwareReque
                 {
                     dn.remove( dn.size() - 1 );
                 }
-                catch ( InvalidNameException e1 )
+                catch ( LdapInvalidDnException e1 )
                 {
                     // never happens
                 }
@@ -369,9 +367,9 @@ public abstract class ReferralAwareReque
          */
         ResultCodeEnum code;
         
-        if ( e instanceof LdapException )
+        if ( e instanceof LdapOperationException )
         {
-            code = ( ( LdapException ) e ).getResultCode();
+            code = ( ( LdapOperationException ) e ).getResultCode();
         }
         else
         {
@@ -395,9 +393,9 @@ public abstract class ReferralAwareReque
         
         result.setErrorMessage( msg );
 
-        if ( e instanceof NamingException )
+        if ( e instanceof LdapOperationException )
         {
-            NamingException ne = ( NamingException ) e;
+            LdapOperationException ne = ( LdapOperationException ) e;
 
             // Add the matchedDN if necessary
             boolean setMatchedDn = 
@@ -406,9 +404,9 @@ public abstract class ReferralAwareReque
                 code == ResultCodeEnum.INVALID_DN_SYNTAX          || 
                 code == ResultCodeEnum.ALIAS_DEREFERENCING_PROBLEM;
             
-            if ( ( ne.getResolvedName() != null ) && setMatchedDn )
+            if ( ( ne.getResolvedDn() != null ) && setMatchedDn )
             {
-                result.setMatchedDn( ( DN ) ne.getResolvedName() );
+                result.setMatchedDn( ( DN ) ne.getResolvedDn() );
             }
         }
 
@@ -438,5 +436,5 @@ public abstract class ReferralAwareReque
     /**
      * Handles processing with referrals without ManageDsaIT control.
      */
-    public abstract void handleWithReferrals( LdapSession session, DN reqTargetDn, T req
) throws NamingException;
+    public abstract void handleWithReferrals( LdapSession session, DN reqTargetDn, T req
) throws LdapException;
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
Wed Mar 17 02:04:07 2010
@@ -26,9 +26,6 @@ import static org.apache.directory.serve
 
 import java.util.concurrent.TimeUnit;
 
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.ReferralManager;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
@@ -47,6 +44,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.OperationAbandonedException;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.OrNode;
@@ -209,7 +207,7 @@ public class SearchHandler extends Refer
                 {
                     cursor.close();
                 }
-                catch ( NamingException e )
+                catch ( Exception e )
                 {
                     LOG.error( I18n.err( I18n.ERR_168 ), e );
                 }
@@ -581,7 +579,7 @@ public class SearchHandler extends Refer
                     {
                         cursor.close();
                     }
-                    catch ( NamingException e )
+                    catch ( Exception e )
                     {
                         LOG.error( I18n.err( I18n.ERR_168 ), e );
                     }
@@ -686,7 +684,7 @@ public class SearchHandler extends Refer
                 {
                     cursor.close();
                 }
-                catch ( NamingException ne )
+                catch ( Exception ne )
                 {
                     LOG.error( I18n.err( I18n.ERR_168 ), ne );
                 }
@@ -758,7 +756,7 @@ public class SearchHandler extends Refer
                 {
                     cursor.close();
                 }
-                catch ( NamingException e )
+                catch ( Exception e )
                 {
                     LOG.error( I18n.err( I18n.ERR_168 ), e );
                 }
@@ -1024,7 +1022,7 @@ public class SearchHandler extends Refer
     /**
      * Handles processing with referrals without ManageDsaIT control.
      */
-    public void handleWithReferrals( LdapSession session, DN reqTargetDn, InternalSearchRequest
req ) throws NamingException
+    public void handleWithReferrals( LdapSession session, DN reqTargetDn, InternalSearchRequest
req ) throws LdapException
     {
         InternalLdapResult result = req.getResultResponse().getLdapResult();
         ClonedServerEntry entry = null;
@@ -1071,7 +1069,7 @@ public class SearchHandler extends Refer
                 entry = session.getCoreSession().lookup( reqTargetDn );
                 LOG.debug( "Entry for {} was found: ", reqTargetDn, entry );
             }
-            catch ( NameNotFoundException e )
+            catch ( LdapException e )
             {
                 /* ignore */
                 LOG.debug( "Entry for {} not found.", reqTargetDn );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
Wed Mar 17 02:04:07 2010
@@ -23,7 +23,6 @@ package org.apache.directory.server.ldap
 import java.util.Hashtable;
 
 import javax.naming.Context;
-import javax.naming.NamingException;
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 import javax.security.auth.callback.Callback;
@@ -40,7 +39,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapOperationException;
 import org.apache.directory.shared.ldap.jndi.JndiUtils;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
@@ -244,19 +243,22 @@ public abstract class AbstractSaslCallba
             env.put( DirectoryService.JNDI_KEY, directoryService );
             ctx = new InitialLdapContext( env, JndiUtils.toJndiControls( connCtls ) );
         }
-        catch ( NamingException e )
+        catch ( Exception e )
         {
             ResultCodeEnum code;
+            DN dn = null;
 
-            if ( e instanceof LdapException )
+            if ( e instanceof LdapOperationException )
             {
-                code = ( ( LdapException ) e ).getResultCode();
+                code = ( ( LdapOperationException ) e ).getResultCode();
                 result.setResultCode( code );
+                dn = ( ( LdapOperationException ) e ).getResolvedDn();
             }
             else
             {
                 code = ResultCodeEnum.getBestEstimate( e, bindRequest.getType() );
                 result.setResultCode( code );
+                //dn = new DN( ((NamingException)e).getResolvedName() );
             }
 
             String msg = "Bind failed: " + e.getLocalizedMessage();
@@ -267,11 +269,11 @@ public abstract class AbstractSaslCallba
                 msg += "\n\nBindRequest = \n" + bindRequest.toString();
             }
 
-            if ( ( e.getResolvedName() != null )
+            if ( ( dn != null )
                 && ( ( code == ResultCodeEnum.NO_SUCH_OBJECT ) || ( code == ResultCodeEnum.ALIAS_PROBLEM
)
                     || ( code == ResultCodeEnum.INVALID_DN_SYNTAX ) || ( code == ResultCodeEnum.ALIAS_DEREFERENCING_PROBLEM
) ) )
             {
-                result.setMatchedDn( ( DN ) e.getResolvedName() );
+                result.setMatchedDn( dn );
             }
 
             result.setErrorMessage( msg );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java
Wed Mar 17 02:04:07 2010
@@ -26,6 +26,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
 import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapOperationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalBindResponse;
@@ -35,7 +36,6 @@ import org.apache.directory.shared.ldap.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.Name;
 import javax.security.sasl.SaslServer;
 
 
@@ -85,15 +85,15 @@ public class SimpleMechanismHandler impl
             ldapSession.getIoSession().write( response );
             LOG.debug( "Returned SUCCESS message: {}.", response );
         }
-        catch ( Exception e )
+        catch ( LdapException e )
         {
             // Something went wrong. Write back an error message            
             ResultCodeEnum code = null;
             InternalLdapResult result = bindRequest.getResultResponse().getLdapResult();
 
-            if ( e instanceof LdapException )
+            if ( e instanceof LdapOperationException )
             {
-                code = ( ( LdapException ) e ).getResultCode();
+                code = ( ( LdapOperationException ) e ).getResultCode();
                 result.setResultCode( code );
             }
             else
@@ -110,11 +110,11 @@ public class SimpleMechanismHandler impl
                 msg += "\n\nBindRequest = \n" + bindRequest.toString();
             }
 
-            Name name = null;
+            DN name = null;
             
             if ( e instanceof LdapAuthenticationException )
             {
-                name = ((LdapAuthenticationException)e).getResolvedName();
+                name = ((LdapAuthenticationException)e).getResolvedDn();
             }
             
             if ( ( name != null )

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java
Wed Mar 17 02:04:07 2010
@@ -22,12 +22,11 @@ package org.apache.directory.server.ldap
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.internal.InternalSearchRequest;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -125,7 +124,7 @@ public class PagedSearchContext
                 AttributeType at = schemaManager.lookupAttributeTypeRegistry( attribute );
                 requestSet.add( at.getOid() );
             }
-            catch ( NamingException ne )
+            catch ( LdapException le )
             {
                 // Deal with special attributes : '*', '+' and '1.1'
                 if ( attribute.equals( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) ||
@@ -245,7 +244,7 @@ public class PagedSearchContext
                 return false;
             }
         }
-        catch ( NamingException ne )
+        catch ( LdapException le )
         {
             return false;
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaPeerConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaPeerConfiguration.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaPeerConfiguration.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaPeerConfiguration.java
Wed Mar 17 02:04:07 2010
@@ -21,9 +21,8 @@
 package org.apache.directory.server.ldap.replication;
 
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -135,7 +134,7 @@ public class ReplicaPeerConfiguration
     /**
      * @param principalDN the principalDN to set
      */
-    public void setPrincipalDN( String principalDN ) throws InvalidNameException
+    public void setPrincipalDN( String principalDN ) throws LdapInvalidDnException
     {
         this.principalDN = new DN( principalDN );
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java?rev=924095&r1=924094&r2=924095&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/test/java/org/apache/directory/server/ldap/SettingAlternativeHandlersTest.java
Wed Mar 17 02:04:07 2010
@@ -32,7 +32,6 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.SearchHandler;
 import org.apache.directory.server.ldap.handlers.UnbindHandler;
 import org.apache.directory.shared.ldap.NotImplementedException;
-import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.internal.InternalAbandonRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalAddRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
@@ -73,7 +72,7 @@ public class SettingAlternativeHandlersT
      * provider
      */
     @Test
-    public void testDefaultOperation() throws LdapNamingException
+    public void testDefaultOperation() 
     {
         assertEquals( ldapServer.getName(), LdapServer.SERVICE_NAME );
     }
@@ -87,8 +86,8 @@ public class SettingAlternativeHandlersT
      * provider
      */
     @Test
-    public void testAlternativeConfiguration() throws LdapNamingException
-    {
+    public void testAlternativeConfiguration()
+    { 
         ldapServer.setAbandonHandler( new BogusAbandonHandler() );
         ldapServer.setAddHandler( new BogusAddHandler() );
         ldapServer.setBindHandler( new BogusBindHandler() );



Mime
View raw message