directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376548 - in /directory/trunks/apacheds: core-unit/src/test/java/org/apache/directory/server/core/jndi/ core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ server-installers/ server-main/src/main/assembly/ server-sar/
Date Fri, 10 Feb 2006 04:54:08 GMT
Author: akarasulu
Date: Thu Feb  9 20:54:07 2006
New Revision: 376548

URL: http://svn.apache.org/viewcvs?rev=376548&view=rev
Log:
fixed bug with substring search failure and removed the use of oro which is not longer referenced
in any pom it seems

Modified:
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextTest.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
    directory/trunks/apacheds/server-installers/pom.xml
    directory/trunks/apacheds/server-main/src/main/assembly/apacheds-main.xml
    directory/trunks/apacheds/server-sar/pom.xml

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextTest.java?rev=376548&r1=376547&r2=376548&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextTest.java
(original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextTest.java
Thu Feb  9 20:54:07 2006
@@ -195,6 +195,31 @@
     }
 
     
+    public void testSearchSubstringSubTreeLevel() throws NamingException
+    {
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
+        controls.setDerefLinkFlag( false );
+        sysRoot.addToEnvironment( DerefAliasesEnum.JNDI_PROP, DerefAliasesEnum.NEVERDEREFALIASES.getName()
);
+
+        HashMap map = new HashMap();
+        NamingEnumeration list = sysRoot.search( "", "(objectClass=organ*)", controls );
+        while ( list.hasMore() )
+        {
+            SearchResult result = ( SearchResult ) list.next();
+            map.put( result.getName(), result.getAttributes() );
+        }
+
+        // 13 because it also matches organizationalPerson which the admin is
+        assertEquals( "Expected number of results returned was incorrect", 13, map.size()
);
+        assertTrue( map.containsKey( "ou=system" ) );
+        assertTrue( map.containsKey( "ou=testing00,ou=system" ) );
+        assertTrue( map.containsKey( "ou=testing01,ou=system" ) );
+        assertTrue( map.containsKey( "ou=testing02,ou=system" ) );
+        assertTrue( map.containsKey( "ou=subtest,ou=testing01,ou=system" ) );
+    }
+
+    
     public void testSearchFilterArgs() throws NamingException
     {
         SearchControls controls = new SearchControls();

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java?rev=376548&r1=376547&r2=376548&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
Thu Feb  9 20:54:07 2006
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SubstringNode;
 import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 
 /**
@@ -74,7 +75,14 @@
         SubstringNode snode = ( SubstringNode ) node;
         String oid = oidRegistry.getOid( snode.getAttribute() );
         AttributeType type = attributeTypeRegistry.lookup( oid );
-        Normalizer normalizer = type.getSubstr().getNormalizer();
+        
+        MatchingRule rule = type.getSubstr();
+        if ( rule == null )
+        {
+            rule = type.getEquality();
+        }
+        
+        Normalizer normalizer = rule.getNormalizer();
 
         if ( db.hasUserIndexOn( snode.getAttribute() ) )
         {

Modified: directory/trunks/apacheds/server-installers/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-installers/pom.xml?rev=376548&r1=376547&r2=376548&view=diff
==============================================================================
--- directory/trunks/apacheds/server-installers/pom.xml (original)
+++ directory/trunks/apacheds/server-installers/pom.xml Thu Feb  9 20:54:07 2006
@@ -91,6 +91,7 @@
             <exclude>velocity:velocity</exclude>
             <exclude>org.springframework:spring-aop</exclude>
             <exclude>qdox:qdox</exclude>
+            <exclude>oro:oro</exclude>
             <exclude>commons-attributes:commons-attributes-compiler</exclude>
             <exclude>commons-attributes:commons-attributes-api</exclude>
             <exclude>cglib:cglib</exclude>

Modified: directory/trunks/apacheds/server-main/src/main/assembly/apacheds-main.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-main/src/main/assembly/apacheds-main.xml?rev=376548&r1=376547&r2=376548&view=diff
==============================================================================
--- directory/trunks/apacheds/server-main/src/main/assembly/apacheds-main.xml (original)
+++ directory/trunks/apacheds/server-main/src/main/assembly/apacheds-main.xml Thu Feb  9 20:54:07
2006
@@ -25,6 +25,7 @@
         <exclude>xerces:xerces</exclude>
         <exclude>commons-pool:commons-pool</exclude>
         <exclude>com.sun:tools</exclude>
+        <exclude>oro:oro</exclude>
         <exclude>xml-apis:xml-apis</exclude>
         <exclude>aspectwerkz:aspectwerkz-core</exclude>
         <exclude>velocity:velocity</exclude>

Modified: directory/trunks/apacheds/server-sar/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-sar/pom.xml?rev=376548&r1=376547&r2=376548&view=diff
==============================================================================
--- directory/trunks/apacheds/server-sar/pom.xml (original)
+++ directory/trunks/apacheds/server-sar/pom.xml Thu Feb  9 20:54:07 2006
@@ -100,6 +100,9 @@
 qdox:qdox
             </exclude>
             <exclude>
+oro:oro
+            </exclude>
+            <exclude>
 org.springframework:spring-aop
             </exclude>
             <exclude>



Mime
View raw message