directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r544725 - in /directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw: protocol/ChangePasswordProtocolHandler.java service/BuildReply.java service/ExtractPassword.java service/ProcessPasswordChange.java
Date Wed, 06 Jun 2007 04:13:03 GMT
Author: erodriguez
Date: Tue Jun  5 21:13:01 2007
New Revision: 544725

URL: http://svn.apache.org/viewvc?view=rev&rev=544725
Log:
Added root causes to exceptions in protocol-changepw.

Modified:
    directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
    directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/BuildReply.java
    directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ExtractPassword.java
    directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ProcessPasswordChange.java

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java?view=diff&rev=544725&r1=544724&r2=544725
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
(original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
Tue Jun  5 21:13:01 2007
@@ -136,7 +136,7 @@
         {
             if ( log.isDebugEnabled() )
             {
-                log.debug( ke.getMessage(), ke );
+                log.warn( ke.getMessage(), ke );
             }
             else
             {

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/BuildReply.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/BuildReply.java?view=diff&rev=544725&r1=544724&r2=544725
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/BuildReply.java
(original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/BuildReply.java
Tue Jun  5 21:13:01 2007
@@ -41,8 +41,6 @@
 import org.apache.directory.server.kerberos.shared.messages.value.HostAddress;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.handler.chain.IoHandlerCommand;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -51,9 +49,6 @@
  */
 public class BuildReply implements IoHandlerCommand
 {
-    /** the log for this class */
-    private static final Logger log = LoggerFactory.getLogger( BuildReply.class );
-
     private String contextKey = "context";
 
 
@@ -88,8 +83,7 @@
         }
         catch ( KerberosException ke )
         {
-            log.error( ke.getMessage(), ke );
-            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR );
+            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR, ke );
         }
 
         PrivateMessage privateMessage = new PrivateMessage( encPrivPart );
@@ -111,8 +105,7 @@
         }
         catch ( KerberosException ke )
         {
-            log.error( ke.getMessage(), ke );
-            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR );
+            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR, ke );
         }
 
         ApplicationReply appReply = new ApplicationReply( encRepPart );

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ExtractPassword.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ExtractPassword.java?view=diff&rev=544725&r1=544724&r2=544725
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ExtractPassword.java
(original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ExtractPassword.java
Tue Jun  5 21:13:01 2007
@@ -37,8 +37,6 @@
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.handler.chain.IoHandlerCommand;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -47,9 +45,6 @@
  */
 public class ExtractPassword implements IoHandlerCommand
 {
-    /** the log for this class */
-    private static final Logger log = LoggerFactory.getLogger( ExtractPassword.class );
-
     private String contextKey = "context";
 
 
@@ -81,8 +76,7 @@
         }
         catch ( KerberosException ke )
         {
-            log.error( ke.getMessage(), ke );
-            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR );
+            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR, ke );
         }
 
         ChangePasswordData passwordData = null;
@@ -107,8 +101,7 @@
         }
         catch ( UnsupportedEncodingException uee )
         {
-            log.error( uee.getMessage(), uee );
-            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR );
+            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR, uee );
         }
 
         next.execute( session, message );

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ProcessPasswordChange.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ProcessPasswordChange.java?view=diff&rev=544725&r1=544724&r2=544725
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ProcessPasswordChange.java
(original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ProcessPasswordChange.java
Tue Jun  5 21:13:01 2007
@@ -67,13 +67,11 @@
         }
         catch ( NamingException ne )
         {
-            log.warn( ne.getMessage(), ne );
-            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR, ne.getExplanation().getBytes()
);
+            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_SOFTERROR, ne );
         }
         catch ( Exception e )
         {
-            log.error( "Unexpected exception.", e );
-            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_HARDERROR );
+            throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_HARDERROR, e );
         }
 
         next.execute( session, message );



Mime
View raw message