directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r923473 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec: LdapMessageGrammar.java LdapTransformer.java actions/MatchedDNAction.java search/controls/entryChange/EntryChangeControlGrammar.java
Date Mon, 15 Mar 2010 22:25:03 GMT
Author: kayyagari
Date: Mon Mar 15 22:25:03 2010
New Revision: 923473

URL: http://svn.apache.org/viewvc?rev=923473&view=rev
Log:
replaced jndi exceptions with custom exceptions

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=923473&r1=923472&r2=923473&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
Mon Mar 15 22:25:03 2010
@@ -20,7 +20,6 @@
 package org.apache.directory.shared.ldap.codec;
 
 
-import javax.naming.InvalidNameException;
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
@@ -99,6 +98,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
 import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
 import org.apache.directory.shared.ldap.codec.unbind.UnBindRequestCodec;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.message.BindResponseImpl;
@@ -368,7 +368,7 @@ public class LdapMessageGrammar extends 
                         {
                             entry = new DN( dnStr );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             String msg = I18n.err( I18n.ERR_04074, dnStr, StringTools.dumpBytes(
dnBytes ),
                             		ine.getLocalizedMessage() );
@@ -593,7 +593,7 @@ public class LdapMessageGrammar extends 
                             DN dn = new DN( dnStr );
                             bindRequestMessage.setName( dn );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             String msg = "Incorrect DN given : " + dnStr + " ("
                                 + StringTools.dumpBytes( dnBytes ) + ") is invalid";
@@ -1162,7 +1162,7 @@ public class LdapMessageGrammar extends 
                         {
                             objectName = new DN( dnStr );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             // This is for the client side. We will never decode LdapResult
on the server
                             String msg = "The DN " + StringTools.dumpBytes( dnBytes ) + "is
invalid : "
@@ -1468,7 +1468,7 @@ public class LdapMessageGrammar extends 
                         {
                             object = new DN( dnStr );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             String msg = "Invalid DN given : " + dnStr + " ("
                                 + StringTools.dumpBytes( dnBytes ) + ") is invalid";
@@ -1910,7 +1910,7 @@ public class LdapMessageGrammar extends 
                         {
                             entryDn = new DN( dnStr );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             String msg = "Invalid DN given : " + dnStr + " ("
                                 + StringTools.dumpBytes( dnBytes ) + ") is invalid";
@@ -2215,7 +2215,7 @@ public class LdapMessageGrammar extends 
                         {
                             entry = new DN( dnStr );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             String msg = "Invalid DN given : " + dnStr + " ("
                                 + StringTools.dumpBytes( dnBytes ) + ") is invalid";
@@ -2285,7 +2285,7 @@ public class LdapMessageGrammar extends 
                             DN dn = new DN( dnStr );
                             newRdn = dn.getRdn( 0 );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             String msg = "Invalid new RDN given : " + dnStr + " ("
                                 + StringTools.dumpBytes( dnBytes ) + ") is invalid";
@@ -2412,7 +2412,7 @@ public class LdapMessageGrammar extends 
                         {
                             newSuperior = new DN( dnStr );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             String msg = "Invalid new superior DN given : " + dnStr
                                 + " (" + StringTools.dumpBytes( dnBytes ) + ") is invalid";
@@ -2568,7 +2568,7 @@ public class LdapMessageGrammar extends 
                         {
                             entry = new DN( dnStr );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             String msg = "Invalid DN given : " + dnStr + " ("
                                 + StringTools.dumpBytes( dnBytes ) + ") is invalid";
@@ -3663,7 +3663,7 @@ public class LdapMessageGrammar extends 
                         {
                             baseObject = new DN( dnStr );
                         }
-                        catch ( InvalidNameException ine )
+                        catch ( LdapInvalidDnException ine )
                         {
                             String msg = "Invalid root DN given : " + dnStr + " ("
                                 + StringTools.dumpBytes( dnBytes ) + ") is invalid";

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java?rev=923473&r1=923472&r2=923473&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
Mon Mar 15 22:25:03 2010
@@ -24,8 +24,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.asn1.Asn1Object;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
@@ -66,6 +64,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.filter.AndNode;
 import org.apache.directory.shared.ldap.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.filter.BranchNode;
@@ -247,7 +246,7 @@ public class LdapTransformer
         {
             internalLdapResult.setMatchedDn( new DN( codecLdapResult.getMatchedDN() ) );
         }
-        catch ( InvalidNameException e )
+        catch ( LdapInvalidDnException e )
         {
             LOG.error( I18n.err( I18n.ERR_04111, codecLdapResult.getMatchedDN() ) );
             internalLdapResult.setMatchedDn( new DN() );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java?rev=923473&r1=923472&r2=923473&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
Mon Mar 15 22:25:03 2010
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.codec.actions;
 
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -30,6 +28,7 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.LdapResultCodec;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -94,7 +93,7 @@ public class MatchedDNAction extends Gra
                     {
                         ldapResult.setMatchedDN( new DN( dnStr ) );
                     }
-                    catch ( InvalidNameException ine )
+                    catch ( LdapInvalidDnException ine )
                     {
                         // This is for the client side. We will never decode LdapResult on
the server
                         String msg = I18n.err( I18n.ERR_04013, dnStr, StringTools.dumpBytes(
dnBytes ), ine.getLocalizedMessage() );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java?rev=923473&r1=923472&r2=923473&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java
Mon Mar 15 22:25:03 2010
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.ldap.codec.search.controls.entryChange;
 
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.ber.grammar.AbstractGrammar;
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
@@ -36,6 +34,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.util.LongDecoderException;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -177,7 +176,7 @@ public class EntryChangeControlGrammar e
                     {
                         previousDn = new DN( StringTools.utf8ToString( value.getData() )
);
                     }
-                    catch ( InvalidNameException ine )
+                    catch ( LdapInvalidDnException ine )
                     {
                         log.error( I18n.err( I18n.ERR_04047, StringTools.dumpBytes( value.getData()
) ) );
                         throw new DecoderException( I18n.err( I18n.ERR_04048 ) );



Mime
View raw message