You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/05/22 00:16:37 UTC

svn commit: r658903 - in /directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos: KeyDerivationInterceptor.java PasswordPolicyInterceptor.java

Author: akarasulu
Date: Wed May 21 15:16:31 2008
New Revision: 658903

URL: http://svn.apache.org/viewvc?rev=658903&view=rev
Log:
fix compilation breakage with NamingExceptions

Modified:
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
    directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyInterceptor.java

Modified: directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java?rev=658903&r1=658902&r2=658903&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java Wed May 21 15:16:31 2008
@@ -30,8 +30,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
@@ -212,7 +210,7 @@
      * @throws NamingException
      */
     void detectPasswordModification( ModifyOperationContext modContext, ModifySubContext subContext )
-        throws NamingException
+        throws Exception
     {
         List<Modification> mods = modContext.getModItems();
 
@@ -286,7 +284,7 @@
      * @throws NamingException
      */
     void lookupPrincipalAttributes( ModifyOperationContext modContext, ModifySubContext subContext )
-        throws NamingException
+        throws Exception
     {
         LdapDN principalDn = modContext.getDn();
 
@@ -357,7 +355,7 @@
      * @param modContext
      * @param subContext
      */
-    void deriveKeys( ModifyOperationContext modContext, ModifySubContext subContext ) throws NamingException
+    void deriveKeys( ModifyOperationContext modContext, ModifySubContext subContext ) throws Exception
     {
         List<Modification> mods = modContext.getModItems();
 
@@ -403,7 +401,7 @@
     }
 
 
-    private ServerAttribute getKeyAttribute( Registries registries, Map<EncryptionType, EncryptionKey> keys ) throws NamingException
+    private ServerAttribute getKeyAttribute( Registries registries, Map<EncryptionType, EncryptionKey> keys ) throws Exception
     {
         ServerAttribute keyAttribute = 
             new DefaultServerAttribute( KerberosAttribute.KRB5_KEY_AT, 

Modified: directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyInterceptor.java?rev=658903&r1=658902&r2=658903&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyInterceptor.java Wed May 21 15:16:31 2008
@@ -37,7 +37,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.NamingException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -66,7 +65,7 @@
      * Check added attributes for a 'userPassword'.  If a 'userPassword' is found, apply any
      * password policy checks.
      */
-    public void add( NextInterceptor next, AddOperationContext addContext ) throws NamingException
+    public void add( NextInterceptor next, AddOperationContext addContext ) throws Exception
     {
         LdapDN normName = addContext.getDn();
 
@@ -110,7 +109,7 @@
      * Check modification items for a 'userPassword'.  If a 'userPassword' is found, apply any
      * password policy checks.
      */
-    public void modify( NextInterceptor next, ModifyOperationContext modContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext modContext ) throws Exception
     {
         LdapDN name = modContext.getDn();
 
@@ -190,7 +189,7 @@
     }
 
 
-    void check( String username, String password ) throws NamingException
+    void check( String username, String password ) throws Exception
     {
         int passwordLength = 6;
         int categoryCount = 2;
@@ -201,7 +200,7 @@
             String explanation = buildErrorMessage( username, password, passwordLength, categoryCount, tokenSize );
             log.error( explanation );
 
-            throw new NamingException( explanation );
+            throw new Exception( explanation );
         }
     }