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 2007/09/29 03:31:31 UTC

svn commit: r580529 - in /directory/apacheds/branches/bigbang: core-unit/src/test/java/org/apache/directory/server/core/jndi/ core/src/main/java/org/apache/directory/server/core/changelog/ core/src/main/java/org/apache/directory/server/core/configurati...

Author: akarasulu
Date: Fri Sep 28 18:31:29 2007
New Revision: 580529

URL: http://svn.apache.org/viewvc?rev=580529&view=rev
Log:
commiting merged changes from trunk from elecharny

Modified:
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java Fri Sep 28 18:31:29 2007
@@ -261,7 +261,7 @@
         sysRoot.addToEnvironment( JndiPropertyConstants.JNDI_LDAP_DAP_DEREF_ALIASES, DerefAliasesEnum.NEVER_DEREF_ALIASES );
         HashMap<String, Attributes> map = new HashMap<String, Attributes>();
 
-        NamingEnumeration list = sysRoot.search( "", "(| (ou={0}) (ou={1}))", new Object[]
+        NamingEnumeration list = sysRoot.search( "", "(|(ou={0})(ou={1}))", new Object[]
             { "testing00", "testing01" }, controls );
         while ( list.hasMore() )
         {
@@ -405,7 +405,7 @@
         sysRoot.addToEnvironment( JndiPropertyConstants.JNDI_LDAP_DAP_DEREF_ALIASES, DerefAliasesEnum.NEVER_DEREF_ALIASES );
         
         HashMap<String, Attributes> map = new HashMap<String, Attributes>();
-        NamingEnumeration list = sysRoot.search( "", "(| (name=testing00)(name=testing01))", controls );
+        NamingEnumeration list = sysRoot.search( "", "(|(name=testing00)(name=testing01))", controls );
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult ) list.next();
@@ -552,7 +552,7 @@
         assertFalse( enm.hasMore() );
         assertEquals( "cn=Kate Bush,ou=system", sr.getName() );
 
-        enm = sysRoot.search( "", "(userCertificate={0})", new Object[] {certData}, controls );
+        enm = sysRoot.search( "", "(userCertificate=\\34\\56\\4E\\5F)", controls );
         assertTrue( enm.hasMore() );
         sr = ( SearchResult ) enm.next();
         assertNotNull( sr );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java Fri Sep 28 18:31:29 2007
@@ -8,10 +8,8 @@
 import java.util.LinkedList;
 import java.util.Queue;
 
-import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 
@@ -29,6 +27,9 @@
 import org.apache.directory.server.core.jndi.ServerContext;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 
+import org.apache.directory.shared.ldap.ldif.ChangeType;
+import org.apache.directory.shared.ldap.ldif.Entry;
+import org.apache.directory.shared.ldap.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.util.Base64;
 import org.apache.directory.shared.ldap.util.DateUtils;
 
@@ -45,25 +46,26 @@
  */
 public class ChangeLogInterceptor extends BaseInterceptor implements Runnable
 {
+    /** logger used by this class */
+    private static final Logger log = LoggerFactory.getLogger( ChangeLogInterceptor.class );
+
     /** time to wait before automatically waking up the writer thread */
     private static final long WAIT_TIMEOUT_MILLIS = 1000;
     
-    private static final Logger log = LoggerFactory.getLogger( ChangeLogInterceptor.class );
-
     /** the changes.log file's stream which we append change log messages to */
-    PrintWriter out = null;
+    private PrintWriter out = null;
     
     /** queue of string buffers awaiting serialization to the log file */
-    Queue<StringBuilder> queue = new LinkedList<StringBuilder>();
+    private Queue<StringBuilder> queue = new LinkedList<StringBuilder>();
     
     /** a handle on the attributeType registry to determine the binary nature of attributes */
-    AttributeTypeRegistry registry = null;
+    private AttributeTypeRegistry registry = null;
     
     /** determines if this service has been activated */
-    boolean isActive = false;
+    private boolean isActive = false;
     
     /** thread used to asynchronously write change logs to disk */
-    Thread writer = null;
+    private Thread writer = null;
     
     
     // -----------------------------------------------------------------------
@@ -216,11 +218,7 @@
         buf.append( DateUtils.getGeneralizedTime() );
         
         // Append the LDIF entry now
-        buf.append( "\ndn: " );
-        buf.append( opContext.getDn().getUpName() );
-        buf.append( "\nchangetype: add" );
-        append( buf, opContext.getEntry() );
-        buf.append( "\n" );
+        buf.append( LdifUtils.convertToLdif( opContext.getEntry() ) );
 
         // Enqueue the buffer onto a queue that is emptied by another thread asynchronously. 
         synchronized ( queue )
@@ -230,7 +228,10 @@
         }
     }
 
-    
+    /**
+     * The delete operation has to be stored with a way to restore the deleted element.
+     * There is no way to do that but reading the entry and dump it into the log.
+     */
     public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
     {
         next.delete( opContext );
@@ -247,10 +248,11 @@
         buf.append( "\n#! deleteTimestamp: " );
         buf.append( DateUtils.getGeneralizedTime() );
         
-        // Append the LDIF record now
-        buf.append( "\ndn: " );
-        buf.append( opContext.getDn() );
-        buf.append( "\nchangetype: delete\n" );
+        Entry entry = new Entry();
+        entry.setDn( opContext.getDn().getUpName() );
+        entry.setChangeType( ChangeType.Delete );
+        buf.append( LdifUtils.convertToLdif( entry ) );
+        
 
         // Enqueue the buffer onto a queue that is emptied by another thread asynchronously. 
         synchronized ( queue )
@@ -478,29 +480,6 @@
     }
     
 
-    /**
-     * Appends a set of attributes to a buffer for an LDIF record.  The Dn is presumed
-     * to be added some time before.
-     * 
-     * @param buf the buffer to add the attributes to
-     * @param attrs the attributes to append to the buffer
-     * @return the buffer argument passed in for chaining
-     * @throws NamingException if some attribute identifiers are not defined
-     */
-    private StringBuilder append( StringBuilder buf, Attributes attrs ) throws NamingException
-    {
-        NamingEnumeration<String> ids = attrs.getIDs();
-        
-        while ( ids.hasMore() )
-        {
-            String id = ids.next();
-            append( buf, attrs.get( id ) );
-        }
-        
-        return buf;
-    }
-
-    
     /**
      * Gets the DN of the user currently bound to the server executing this operation.  If 
      * the user is anonymous "" is returned.

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java Fri Sep 28 18:31:29 2007
@@ -20,19 +20,14 @@
 package org.apache.directory.server.core.configuration;
 
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.naming.directory.Attributes;
-
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.naming.directory.Attributes;
+import java.io.File;
+import java.util.*;
+
 
 /**
  * A {@link Configuration} that starts up ApacheDS.
@@ -135,7 +130,7 @@
 
     /**
      * Creates a new instance with default settings that operates on the
-     * {@link DirectoryService} with the specified ID.
+     * {@link org.apache.directory.server.core.DirectoryService} with the specified ID.
      */
     public StartupConfiguration(String instanceId)
     {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java Fri Sep 28 18:31:29 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.jndi;
 
 
-import java.io.IOException;
 import java.io.Serializable;
 import java.text.ParseException;
 import java.util.Hashtable;
@@ -52,7 +51,7 @@
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
-import org.apache.directory.shared.ldap.filter.FilterParserImpl;
+import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
@@ -655,7 +654,7 @@
 
         try
         {
-            filterNode = filterParser.parse( filter );
+            filterNode = FilterParser.parse( filter );
         }
         catch ( ParseException pe )
         {
@@ -664,12 +663,6 @@
             isfe.setRootCause( pe );
             throw isfe;
         }
-        catch ( IOException ioe )
-        {
-            NamingException ne = new NamingException( "Parser failed with IO exception on filter: '" + filter + "'" );
-            ne.setRootCause( ioe );
-            throw ne;
-        }
 
         return doSearchOperation( target, getEnvironment(), filterNode, cons );
     }
@@ -759,9 +752,6 @@
     // EventDirContext implementations
     // ------------------------------------------------------------------------
 
-    private final FilterParserImpl filterParser = new FilterParserImpl();
-
-
     public void addNamingListener( Name name, String filterStr, SearchControls searchControls,
         NamingListener namingListener ) throws NamingException
     {
@@ -769,7 +759,7 @@
 
         try
         {
-            filter = filterParser.parse( filterStr );
+            filter = FilterParser.parse( filterStr );
         }
         catch ( Exception e )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java Fri Sep 28 18:31:29 2007
@@ -203,7 +203,7 @@
                                 newLeaf = new ExtensibleNode( descendant.getOid(), 
                                     extensibleNode.getValue(), 
                                     extensibleNode.getMatchingRuleId(), 
-                                    extensibleNode.dnAttributes() );
+                                    extensibleNode.hasDnAttributes() );
                             }
                             else if ( leaf instanceof SubstringNode )
                             {
@@ -224,7 +224,6 @@
                 catch ( NamingException e )
                 {
                     // log something here and throw a runtime excpetion
-                    e.printStackTrace();
                     throw new RuntimeException( "Failed to expand node" );
                 }
             }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java Fri Sep 28 18:31:29 2007
@@ -185,7 +185,7 @@
 
 
     /**
-     * This method calls {@link Partition#lookup(EntryOperationContext)} and return <tt>true</tt>
+     * This method calls {@link Partition#lookup(LookupOperationContext)} and return <tt>true</tt>
      * if it returns an entry by default.  Please override this method if
      * there is more effective way for your implementation.
      */

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Fri Sep 28 18:31:29 2007
@@ -801,9 +801,6 @@
     }
 
 
-    /**
-     * @see Partition#modifyModifyOperationContext)
-     */
     public void modify( ModifyOperationContext modifyContext ) throws NamingException
     {
         Partition backend = getPartition( modifyContext.getDn() );
@@ -821,9 +818,6 @@
     }
 
 
-    /**
-     * @see Partition#search(org.apache.directory.shared.ldap.name.LdapDN,java.util.Map,org.apache.directory.shared.ldap.filter.ExprNode,javax.naming.directory.SearchControls)
-     */
     public NamingEnumeration<SearchResult> search( SearchOperationContext opContext )
         throws NamingException
     {
@@ -972,9 +966,6 @@
     }
 
 
-    /**
-     * @see Partition#lookup(org.apache.directory.shared.ldap.name.LdapDN,String[])
-     */
     public Attributes lookup( LookupOperationContext opContext ) throws NamingException
     {
         LdapDN dn = opContext.getDn();
@@ -1057,9 +1048,6 @@
     }
 
 
-    /**
-     * @see Partition#moveAndRename( MaveAndRenameOperationContext )
-     */
     public void moveAndRename( MoveAndRenameOperationContext opContext ) throws NamingException
     {
         Partition backend = getPartition( opContext.getDn() );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java Fri Sep 28 18:31:29 2007
@@ -198,7 +198,7 @@
      * @return true if the entry contains an attribute with the value, false otherwise
      * @throws NamingException if there is a problem accessing the entry and its values
      */
-    public abstract boolean compare( CompareOperationContext opContext ) throws NamingException;
+    public abstract boolean compare( CompareOperationContext compareContext ) throws NamingException;
 
 
     public abstract void addContextPartition( AddContextPartitionOperationContext opContext ) throws NamingException;
@@ -233,7 +233,7 @@
      * the empty string distinguished name if no match was found.
      * @throws NamingException if there are any problems
      */
-    public abstract LdapDN getMatchedName ( GetMatchedNameOperationContext opContext ) throws NamingException;
+    public abstract LdapDN getMatchedName ( GetMatchedNameOperationContext getMatchedNameContext ) throws NamingException;
 
 
     /**
@@ -241,13 +241,13 @@
      * the supplied distinguished name parameter.  If the DN argument does not
      * fall under a partition suffix then the empty string Dn is returned.
      *
-     * @param getSuffixContext the Context containing normalized distinguished 
+     * @param suffixContext the Context containing normalized distinguished
      * name to use for finding a suffix.
      * @return the suffix portion of dn, or the valid empty string Dn if no
      * naming context was found for dn.
      * @throws NamingException if there are any problems
      */
-    public abstract LdapDN getSuffix ( GetSuffixOperationContext opContext ) throws NamingException;
+    public abstract LdapDN getSuffix ( GetSuffixOperationContext suffixContext ) throws NamingException;
 
 
     /**

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Fri Sep 28 18:31:29 2007
@@ -71,7 +71,6 @@
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
-import org.apache.directory.shared.ldap.filter.FilterParserImpl;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.message.DerefAliasesEnum;
@@ -598,12 +597,11 @@
                 + "' and a return limit of '" + limit + "'" );
         }
 
-        FilterParser parser = new FilterParserImpl();
         ExprNode root = null;
 
         try
         {
-            root = parser.parse( filter );
+            root = FilterParser.parse( filter );
         }
         catch ( Exception e )
         {
@@ -742,12 +740,11 @@
 
     public boolean doAnnotate( String filter ) throws Exception
     {
-        FilterParser parser = new FilterParserImpl();
         ExprNode root = null;
 
         try
         {
-            root = parser.parse( filter );
+            root = FilterParser.parse( filter );
         }
         catch ( Exception e )
         {

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/RefinementEvaluatorTest.java Fri Sep 28 18:31:29 2007
@@ -39,7 +39,6 @@
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
-import org.apache.directory.shared.ldap.filter.FilterParserImpl;
 import org.apache.directory.shared.ldap.filter.NotNode;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 
@@ -184,9 +183,9 @@
     {
         ExprNode refinement = null;
         Attribute objectClasses = new AttributeImpl( "objectClass", "person" );
-        FilterParser parser = new FilterParserImpl();
-        String refStr = "(| (objectClass=person) (objectClass=organizationalUnit) )";
-        refinement = parser.parse( refStr );
+        String refStr = "(|(objectClass=person)(objectClass=organizationalUnit))";
+        
+        refinement = FilterParser.parse( refStr );
 
         assertTrue( evaluator.evaluate( refinement, objectClasses ) );
         objectClasses = new AttributeImpl( "objectClass", "organizationalUnit" );
@@ -201,9 +200,9 @@
         ExprNode refinement = null;
         Attribute objectClasses = new AttributeImpl( "objectClass", "person" );
         objectClasses.add( "organizationalUnit" );
-        FilterParser parser = new FilterParserImpl();
-        String refStr = "(& (objectClass=person) (objectClass=organizationalUnit) )";
-        refinement = parser.parse( refStr );
+        String refStr = "(&(objectClass=person)(objectClass=organizationalUnit))";
+        
+        refinement = FilterParser.parse( refStr );
 
         assertTrue( evaluator.evaluate( refinement, objectClasses ) );
         objectClasses = new AttributeImpl( "objectClass", "organizationalUnit" );
@@ -219,9 +218,9 @@
     {
         ExprNode refinement = null;
         Attribute objectClasses = new AttributeImpl( "objectClass", "person" );
-        FilterParser parser = new FilterParserImpl();
-        String refStr = "(! (objectClass=person) )";
-        refinement = parser.parse( refStr );
+        String refStr = "(!(objectClass=person))";
+
+        refinement = FilterParser.parse( refStr );
 
         assertFalse( evaluator.evaluate( refinement, objectClasses ) );
         objectClasses = new AttributeImpl( "objectClass", "organizationalUnit" );

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java Fri Sep 28 18:31:29 2007
@@ -40,7 +40,6 @@
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
-import org.apache.directory.shared.ldap.filter.FilterParserImpl;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -234,8 +233,7 @@
 
     public void testWithMinMaxAndSimpleRefinement() throws Exception
     {
-        FilterParser parser = new FilterParserImpl();
-        ExprNode refinement = parser.parse( "( objectClass = person )" );
+        ExprNode refinement = FilterParser.parse( "(objectClass=person)" );
 
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         modifier.setRefinement( refinement );
@@ -293,8 +291,7 @@
     
     public void testWithFilter() throws Exception
     {
-        FilterParser parser = new FilterParserImpl();
-        ExprNode filter = parser.parse( "(&(cn=Ersin)(objectClass=person))" );
+        ExprNode filter = FilterParser.parse( "(&(cn=Ersin)(objectClass=person))" );
 
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         modifier.setRefinement( filter );

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java (original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java Fri Sep 28 18:31:29 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.mitosis.service;
 
 
-import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.text.ParseException;
 import java.util.ArrayList;
@@ -73,7 +72,6 @@
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
-import org.apache.directory.shared.ldap.filter.FilterParserImpl;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.mina.common.IoAcceptor;
@@ -297,17 +295,12 @@
         CSN purgeCSN = new DefaultCSN( System.currentTimeMillis() - configuration.getLogMaxAge() * 1000L * 60L * 60L
             * 24L, // convert days to millis
             new ReplicaId( "ZZZZZZZZZZZZZZZZ" ), Integer.MAX_VALUE );
-        FilterParser parser = new FilterParserImpl();
         ExprNode filter;
 
         try
         {
-            filter = parser.parse( "(& (" + ENTRY_CSN_OID + "<=" + purgeCSN.toOctetString() + ") (" + ENTRY_DELETED_OID
+            filter = FilterParser.parse( "(&(" + ENTRY_CSN_OID + "<=" + purgeCSN.toOctetString() + ")(" + ENTRY_DELETED_OID
                 + "=TRUE))" );
-        }
-        catch ( IOException e )
-        {
-            throw ( NamingException ) new NamingException().initCause( e );
         }
         catch ( ParseException e )
         {

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java?rev=580529&r1=580528&r2=580529&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/MiscTest.java Fri Sep 28 18:31:29 2007
@@ -352,10 +352,10 @@
         e = sysRoot.search( "", "(!(bogusAttribute=abc123))", cons );
         assertNotNull( e );
         assertEquals( e.getClass(), EmptyEnumeration.class );
-        e = sysRoot.search( "", "(| (bogusAttribute=abc123)(bogusAttribute=abc123) )", cons );
+        e = sysRoot.search( "", "(|(bogusAttribute=abc123)(bogusAttribute=abc123))", cons );
         assertNotNull( e );
         assertEquals( e.getClass(), EmptyEnumeration.class );
-        e = sysRoot.search( "", "(| (bogusAttribute=abc123)(ou=abc123) )", cons );
+        e = sysRoot.search( "", "(|(bogusAttribute=abc123)(ou=abc123))", cons );
         assertNotNull( e );
         assertFalse( e.getClass().equals( EmptyEnumeration.class ) );