directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 10089 - in incubator/directory/ldap/trunk/snacc-provider: . src/java/org/apache/ldap/common/berlib/snacc
Date Mon, 19 Apr 2004 03:29:58 GMT
Author: akarasulu
Date: Sun Apr 18 20:29:57 2004
New Revision: 10089

Modified:
   incubator/directory/ldap/trunk/snacc-provider/   (props changed)
   incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/BindResponseTransform.java
   incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/ReferralTransform.java
   incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SearchResponseReferenceTransform.java
Log:
Commit changes ...

o corrected for changes to throws on url addition to Referral
o found a bug or two in the snacc provider code while using it for snickers



Modified: incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/BindResponseTransform.java
==============================================================================
--- incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/BindResponseTransform.java
(original)
+++ incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/BindResponseTransform.java
Sun Apr 18 20:29:57 2004
@@ -123,7 +123,8 @@
         // Set the resultCode
 		LDAPResultEnum l_snaccResultEnum = new LDAPResultEnum() ;
         l_snaccResponse.resultCode = l_snaccResultEnum ;
-		l_snaccResultEnum.value = l_result.getResultCode().getValue() ;
+        ResultCodeEnum l_resultCode = l_result.getResultCode() ;
+		l_snaccResultEnum.value = l_resultCode.getValue() ;
 
         // Set the error message if one exists
         if( l_result.getErrorMessage() == null )
@@ -147,7 +148,7 @@
         // Freak if unimplemented SASL fields are used.
         if( a_resp.getServerSaslCreds() != null )
         {
-            throw new NotImplementedException( "SASL not implemented!") ;
+            l_snaccResponse.serverSaslCreds = a_resp.getServerSaslCreds() ;
         }
 
         return l_snaccMessage ;

Modified: incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/ReferralTransform.java
==============================================================================
--- incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/ReferralTransform.java
(original)
+++ incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/ReferralTransform.java
Sun Apr 18 20:29:57 2004
@@ -202,7 +202,7 @@
  *   limitations under the License.
  *
  */
-
+
 /*
  * $Id: ReferralTransform.java,v 1.3 2003/05/11 01:42:46 akarasulu Exp $
  *
@@ -291,17 +291,8 @@
         ReferralImpl l_referral = new ReferralImpl( a_result ) ;
         for( int ii = 0; ii < a_snaccReferral.size(); ii++ )
         {
-            try
-            {
-				l_referral.addLdapUrl( new String( (byte [])
-					a_snaccReferral.get( ii ) ) ) ;
-            }
-            catch( NamingException ne )
-            {
-				ProviderException pe = new ProviderException(
-                    SnaccProvider.getProvider(),
-                    "Could not parse LDAPURL in Referral!" ) ;
-            }
+            l_referral.addLdapUrl( new String( (byte [])
+                    a_snaccReferral.get( ii ) ) ) ;
         }
 
         // At the end we set the

Modified: incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SearchResponseReferenceTransform.java
==============================================================================
--- incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SearchResponseReferenceTransform.java
(original)
+++ incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SearchResponseReferenceTransform.java
Sun Apr 18 20:29:57 2004
@@ -18,18 +18,12 @@
 
 
 import java.util.Iterator ;
-import javax.naming.NamingException ;
 
-import org.apache.ldap.common.message.LdapResult ;
 import org.apache.ldap.common.message.ReferralImpl ;
-import org.apache.ldap.common.message.LdapResultImpl ;
-import org.apache.ldap.common.message.ResultCodeEnum ;
 import org.apache.ldap.common.message.spi.ProviderException ;
-import org.apache.ldap.common.message.SearchResponseReference ;
 import org.apache.ldap.common.message.SearchResponseReferenceImpl ;
 
 import org.apache.ldap.common.berlib.snacc.ldap_v3.LDAPMessage ;
-import org.apache.ldap.common.berlib.snacc.ldap_v3.LDAPResultEnum ;
 import org.apache.ldap.common.berlib.snacc.ldap_v3.LDAPMessageChoice ;
 import org.apache.ldap.common.berlib.snacc.ldap_v3.SearchResultReference ;
 
@@ -61,19 +55,7 @@
         l_response.setReferral( l_referral ) ;
         while( l_list.hasNext() )
         {
-            try
-            {
-                l_referral.addLdapUrl(
-                    new String( ( byte [] ) l_list.next() ) ) ;
-            }
-            catch( NamingException ne )
-            {
-                ProviderException pe = new ProviderException(
-                    SnaccProvider.getProvider(),
-                    "Failed to add LDAPURL to referral!" ) ;
-                pe.addThrowable( ne ) ;
-                throw pe ;
-            }
+            l_referral.addLdapUrl( new String( ( byte [] ) l_list.next() ) ) ;
         }
 
         return l_response ;

Mime
View raw message