directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r957199 - in /directory/shared/trunk: ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/ ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/
Date Wed, 23 Jun 2010 13:44:00 GMT
Author: elecharny
Date: Wed Jun 23 13:44:00 2010
New Revision: 957199

URL: http://svn.apache.org/viewvc?rev=957199&view=rev
Log:
reverted back to a rev that builds : 955985

Modified:
    directory/shared/trunk/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/MatchingRuleTest.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableAttributeTypeRegistry.java

Modified: directory/shared/trunk/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/MatchingRuleTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/MatchingRuleTest.java?rev=957199&r1=957198&r2=957199&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/MatchingRuleTest.java
(original)
+++ directory/shared/trunk/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/MatchingRuleTest.java
Wed Jun 23 13:44:00 2010
@@ -198,30 +198,17 @@ public class MatchingRuleTest
     {
         MatchingRule mr1 = schemaManager.lookupMatchingRuleRegistry( "generalizedTimeMatch"
);
         assertEquals( GeneralizedTimeNormalizer.class.getName(), mr1.getNormalizer().getClass().getName()
);
-        
-        String normalized = mr1.getNormalizer().normalize( "2010031415Z" );
-        assertTrue( "20100314150000.000Z".equals( normalized ) || "20100314153000.000Z".equals(
normalized ) || "20100314154500.000Z".equals( normalized ) );
+        assertEquals( "20100314150000.000Z", mr1.getNormalizer().normalize( "2010031415Z"
) );
         assertEquals( "20100314133102.003Z", mr1.getNormalizer().normalize( "20100314150102.003+0130"
) );
         assertEquals( GeneralizedTimeComparator.class.getName(), mr1.getLdapComparator().getClass().getName()
);
-
-        // Deal with +HH:30 and +HH:45 TZ
-        int compare1 = mr1.getLdapComparator().compare( "2010031415Z", "20100314150000.000+0000"
);
-        int compare2 = mr1.getLdapComparator().compare( "2010031415Z", "20100314153000.000+0000"
);
-        int compare3 = mr1.getLdapComparator().compare( "2010031415Z", "20100314154500.000+0000"
);
-        assertTrue( ( compare1 == 0 ) || ( compare2 == 0 ) || ( compare3 == 0 ) );
+        assertEquals( 0, mr1.getLdapComparator().compare( "2010031415Z", "20100314150000.000+0000"
) );
 
         MatchingRule mr2 = schemaManager.lookupMatchingRuleRegistry( "generalizedTimeOrderingMatch"
);
         assertEquals( GeneralizedTimeNormalizer.class.getName(), mr2.getNormalizer().getClass().getName()
);
-        normalized = mr2.getNormalizer().normalize( "2010031415Z" );
-        assertTrue( "20100314150000.000Z".equals( normalized ) || "20100314153000.000Z".equals(
normalized ) || "20100314154500.000Z".equals( normalized ) );
+        assertEquals( "20100314150000.000Z", mr2.getNormalizer().normalize( "2010031415Z"
) );
         assertEquals( "20100314133102.003Z", mr2.getNormalizer().normalize( "20100314150102.003+0130"
) );
         assertEquals( GeneralizedTimeComparator.class.getName(), mr2.getLdapComparator().getClass().getName()
);
-
-        // Deal with +HH:30 and +HH:45 TZ
-        compare1 = mr2.getLdapComparator().compare( "2010031415Z", "20100314150000.000+0000"
);
-        compare2 = mr2.getLdapComparator().compare( "2010031415Z", "20100314153000.000+0000"
);
-        compare3 = mr2.getLdapComparator().compare( "2010031415Z", "20100314154500.000+0000"
);
-        assertTrue( ( compare1 == 0 ) || ( compare2 == 0 ) || ( compare3 == 0 ) );
+        assertEquals( 0, mr2.getLdapComparator().compare( "2010031415Z", "20100314150000.000+0000"
) );
         assertTrue( mr2.getLdapComparator().compare( "2010031415Z", "2010031414Z" ) >
0 );
         assertTrue( mr2.getLdapComparator().compare( "2010031415Z", "2010031416Z" ) <
0 );
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableAttributeTypeRegistry.java?rev=957199&r1=957198&r2=957199&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableAttributeTypeRegistry.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/ImmutableAttributeTypeRegistry.java
Wed Jun 23 13:44:00 2010
@@ -25,7 +25,6 @@ import java.util.Map;
 
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -206,14 +205,7 @@ public class ImmutableAttributeTypeRegis
      */
     public String getOidByName( String name ) throws LdapException
     {
-        try
-        { 
-            return immutableAttributeTypeRegistry.getOidByName( name );
-        }
-        catch ( LdapException le )
-        {
-            throw new LdapNoSuchAttributeException( le.getMessage() );
-        }
+        return immutableAttributeTypeRegistry.getOidByName( name );
     }
 
 



Mime
View raw message