directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r569032 - in /directory: apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/ shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/ shared/trunk/asn1/src/main/java/o...
Date Thu, 23 Aug 2007 15:05:33 GMT
Author: elecharny
Date: Thu Aug 23 08:05:32 2007
New Revision: 569032

URL: http://svn.apache.org/viewvc?rev=569032&view=rev
Log:
Remove a useless NamingException which was incorrectly thrown by the decoder.

Modified:
    directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IAction.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IGrammar.java

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java?rev=569032&r1=569031&r2=569032&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java
(original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java
Thu Aug 23 08:05:32 2007
@@ -26,7 +26,6 @@
 import java.util.Hashtable;
 import java.util.Map;
 
-import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 import javax.naming.event.EventContext;
 import javax.naming.event.NamingExceptionEvent;
@@ -41,6 +40,7 @@
 import org.apache.directory.server.tools.execution.BaseToolCommandExecutor;
 import org.apache.directory.server.tools.util.ListenerParameter;
 import org.apache.directory.server.tools.util.Parameter;
+import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
 import org.apache.directory.shared.ldap.message.extended.GracefulDisconnect;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
@@ -313,12 +313,17 @@
         {
             notifyOutputListener( "Recieved GracefulDisconnect: " + GracefulDisconnect.EXTENSION_OID
);
             GracefulDisconnect gd = null;
-			try {
+			
+            try 
+			{
 				gd = new GracefulDisconnect( notification.getEncodedValue() );
-			} catch (NamingException e) {
+			} 
+            catch ( DecoderException de ) 
+            {
 				// TODO Auto-generated catch block
-				e.printStackTrace();
+				de.printStackTrace();
 			}
+            
             notifyOutputListener( "LDAP server will shutdown in " + gd.getDelay() + " seconds."
);
             notifyOutputListener( "LDAP server will be back online in " + gd.getTimeOffline()
+ " minutes." );
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java?rev=569032&r1=569031&r2=569032&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
Thu Aug 23 08:05:32 2007
@@ -32,8 +32,6 @@
 
 import java.nio.ByteBuffer;
 
-import javax.naming.NamingException;
-
 
 /**
  * A BER TLV Tag component decoder. This decoder instanciate a Tag. The tag
@@ -613,7 +611,7 @@
      * </code> otherwise
      * @throws DecoderException Thrown if anything went wrong
      */
-    private boolean treatTLVDoneState( ByteBuffer stream, IAsn1Container container ) throws
DecoderException, NamingException
+    private boolean treatTLVDoneState( ByteBuffer stream, IAsn1Container container ) throws
DecoderException
     {
         if ( IS_DEBUG )
         {
@@ -713,7 +711,7 @@
      * and other elements.
      * @throws DecoderException Thrown if anything went wrong!
      */
-    public void decode( ByteBuffer stream, IAsn1Container container ) throws DecoderException,
NamingException
+    public void decode( ByteBuffer stream, IAsn1Container container ) throws DecoderException
     {
 
         /*

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java?rev=569032&r1=569031&r2=569032&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
Thu Aug 23 08:05:32 2007
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.asn1.ber.grammar;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
@@ -113,7 +111,7 @@
      * @param container The Asn1Container
      * @throws DecoderException Thrown if anything went wrong
      */
-    public void executeAction( IAsn1Container container ) throws DecoderException, NamingException
+    public void executeAction( IAsn1Container container ) throws DecoderException
     {
 
         int currentState = container.getTransition();

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IAction.java?rev=569032&r1=569031&r2=569032&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IAction.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IAction.java
Thu Aug 23 08:05:32 2007
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.asn1.ber.grammar;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 
@@ -45,5 +43,5 @@
      * @throws DecoderException
      *             Thrown if something went wrong.
      */
-    public void action( IAsn1Container container ) throws DecoderException, NamingException;
+    public void action( IAsn1Container container ) throws DecoderException;
 }

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IGrammar.java?rev=569032&r1=569031&r2=569032&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IGrammar.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/IGrammar.java
Thu Aug 23 08:05:32 2007
@@ -20,8 +20,6 @@
 package org.apache.directory.shared.asn1.ber.grammar;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 
@@ -45,7 +43,7 @@
      * @throws DecoderException
      *             Thrown when an unrecoverable error occurs.
      */
-    void executeAction( IAsn1Container asn1Container ) throws DecoderException, NamingException;
+    void executeAction( IAsn1Container asn1Container ) throws DecoderException;
 
 
     /**



Mime
View raw message