directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1067726 - in /directory: shared/branches/m1/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/ shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ shared/branches/m1/dsml-parser/src/main/java/...
Date Sun, 06 Feb 2011 18:50:25 GMT
Author: akarasulu
Date: Sun Feb  6 18:50:25 2011
New Revision: 1067726

URL: http://svn.apache.org/viewvc?rev=1067726&view=rev
Log:
avoiding static instance variables

Modified:
    directory/shared/branches/m1/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
    directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2Parser.java
    directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java
    directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/AttributeValueAssertion.java
    directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java

Modified: directory/shared/branches/m1/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java (original)
+++ directory/shared/branches/m1/dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java Sun Feb  6 18:50:25 2011
@@ -45,6 +45,7 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.reponse.SearchResultEntryDsml;
 import org.apache.directory.shared.dsmlv2.reponse.SearchResultReferenceDsml;
 import org.apache.directory.shared.dsmlv2.request.BatchRequestDsml;
+import org.apache.directory.shared.dsmlv2.request.Dsmlv2Grammar;
 import org.apache.directory.shared.dsmlv2.request.BatchRequestDsml.OnError;
 import org.apache.directory.shared.dsmlv2.request.BatchRequestDsml.Processing;
 import org.apache.directory.shared.dsmlv2.request.BatchRequestDsml.ResponseOrder;
@@ -116,7 +117,9 @@ public class Dsmlv2Engine
     
     private LdapCodecService codec = new DefaultLdapCodecService();
 
+    private Dsmlv2Grammar grammar = new Dsmlv2Grammar( codec );
 
+    
     /**
      * Creates a new instance of Dsmlv2Engine.
      * 
@@ -146,7 +149,7 @@ public class Dsmlv2Engine
      */
     public String processDSML( String dsmlInput ) throws XmlPullParserException
     {
-        parser = new Dsmlv2Parser( codec );
+        parser = new Dsmlv2Parser( grammar );
         parser.setInput( dsmlInput );
 
         return processDSML();
@@ -167,7 +170,7 @@ public class Dsmlv2Engine
      */
     public String processDSMLFile( String fileName ) throws XmlPullParserException, FileNotFoundException
     {
-        parser = new Dsmlv2Parser( codec );
+        parser = new Dsmlv2Parser( grammar );
         parser.setInputFile( fileName );
 
         return processDSML();
@@ -188,7 +191,7 @@ public class Dsmlv2Engine
      */
     public String processDSML( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
     {
-        parser = new Dsmlv2Parser( codec );
+        parser = new Dsmlv2Parser( grammar );
         parser.setInput( inputStream, inputEncoding );
         return processDSML();
     }

Modified: directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2Parser.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2Parser.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2Parser.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/Dsmlv2Parser.java Sun Feb  6 18:50:25 2011
@@ -31,7 +31,6 @@ import java.io.StringReader;
 import org.apache.directory.shared.dsmlv2.request.BatchRequestDsml;
 import org.apache.directory.shared.dsmlv2.request.Dsmlv2Grammar;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.LdapCodecService;
 import org.apache.directory.shared.ldap.model.message.Request;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
@@ -48,6 +47,9 @@ public class Dsmlv2Parser
 {
     /** The associated DSMLv2 container */
     private Dsmlv2Container container;
+    
+    /** The thread safe DSMLv2 Grammar */
+    private Dsmlv2Grammar grammar;
 
 
     /**
@@ -56,12 +58,12 @@ public class Dsmlv2Parser
      * @throws XmlPullParserException
      *      if an error occurs while the initialization of the parser
      */
-    public Dsmlv2Parser( LdapCodecService codec ) throws XmlPullParserException
+    public Dsmlv2Parser( Dsmlv2Grammar grammar ) throws XmlPullParserException
     {
-        this.container = new Dsmlv2Container( codec );
-
-        this.container.setGrammar( Dsmlv2Grammar.getInstance() );
-
+        this.container = new Dsmlv2Container( grammar.getLdapCodecService() );
+        this.container.setGrammar( grammar );
+        this.grammar = grammar;
+        
         XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
         factory.setNamespaceAware( true );
         XmlPullParser xpp = factory.newPullParser();
@@ -127,8 +129,6 @@ public class Dsmlv2Parser
      */
     public void parse() throws XmlPullParserException, IOException
     {
-        Dsmlv2Grammar grammar = Dsmlv2Grammar.getInstance();
-
         grammar.executeAction( container );
     }
 

Modified: directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java Sun Feb  6 18:50:25 2011
@@ -41,7 +41,6 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.request.BatchRequestDsml.ResponseOrder;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
-import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
 import org.apache.directory.shared.ldap.codec.CodecControl;
 import org.apache.directory.shared.ldap.codec.LdapCodecService;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
@@ -80,19 +79,17 @@ import org.xmlpull.v1.XmlPullParserExcep
  */
 public final class Dsmlv2Grammar extends AbstractGrammar implements IGrammar
 {
-    /** The instance of grammar. Dsmlv2Grammar is a singleton */
-    private static Dsmlv2Grammar instance = new Dsmlv2Grammar();
-
-    private LdapCodecService codec = new DefaultLdapCodecService();
+    private LdapCodecService codec;
     
 
     /**
      * Creates a new instance of Dsmlv2Grammar.
      */
     @SuppressWarnings("unchecked")
-    private Dsmlv2Grammar()
+    public Dsmlv2Grammar( LdapCodecService codec )
     {
         name = Dsmlv2Grammar.class.getName();
+        this.codec = codec;
 
         // Create the transitions table
         super.transitions = ( HashMap<Tag, GrammarTransition>[] ) Array.newInstance( HashMap.class, 200 ); // TODO Change this value
@@ -1031,6 +1028,17 @@ public final class Dsmlv2Grammar extends
 
     } // End of the constructor
 
+    
+    
+    /**
+     * @return The LDAP codec service.
+     */
+    public LdapCodecService getLdapCodecService()
+    {
+        return codec;
+    }
+    
+    
     //*************************
     //*    GRAMMAR ACTIONS    *
     //*************************
@@ -2822,16 +2830,4 @@ public final class Dsmlv2Grammar extends
             }
         }
     };
-
-
-    /**
-     * Gets an instance of this grammar
-     * 
-     * @return
-     *      an instance of this grammar
-     */
-    public static Dsmlv2Grammar getInstance()
-    {
-        return instance;
-    }
 }

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/AbstractTest.java Sun Feb  6 18:50:25 2011
@@ -24,6 +24,7 @@ package org.apache.directory.shared.dsml
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import org.apache.directory.shared.dsmlv2.request.Dsmlv2Grammar;
 import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
 import org.apache.directory.shared.ldap.codec.LdapCodecService;
 import org.xmlpull.v1.XmlPullParserException;
@@ -38,12 +39,24 @@ public abstract class AbstractTest
     /** The LDAP encoder decoder service */
     private LdapCodecService codec = new DefaultLdapCodecService();
     
+    private Dsmlv2Grammar grammar = new Dsmlv2Grammar( codec );
+    
+    
+    public Dsmlv2Parser newParser() throws Exception
+    {
+        return new Dsmlv2Parser( grammar );
+    }
+    
+    
     public LdapCodecService getCodec()
     {
         return codec;
     }
     
     
+    
+    
+    
     /**
      * Asserts that parsing throws a correct XmlPullParserException due to an incorrect file
      *
@@ -56,7 +69,7 @@ public abstract class AbstractTest
     {
         try
         {
-            Dsmlv2Parser parser = new Dsmlv2Parser( codec );
+            Dsmlv2Parser parser = new Dsmlv2Parser( grammar );
 
             parser.setInput( testClass.getResource( filename ).openStream(), "UTF-8" );
 

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java Sun Feb  6 18:50:25 2011
@@ -69,7 +69,7 @@ public class AbandonRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AbandonRequestTest.class.getResource( "request_with_abandonID_attribute.xml" )
                 .openStream(), "UTF-8" );
@@ -106,7 +106,7 @@ public class AbandonRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AbandonRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
                 .openStream(), "UTF-8" );
@@ -134,7 +134,7 @@ public class AbandonRequestTest extends 
 
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser
                 .setInput( AbandonRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
@@ -170,7 +170,7 @@ public class AbandonRequestTest extends 
 
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AbandonRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -206,7 +206,7 @@ public class AbandonRequestTest extends 
 
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AbandonRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
                 .openStream(), "UTF-8" );
@@ -242,7 +242,7 @@ public class AbandonRequestTest extends 
 
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AbandonRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(),
                 "UTF-8" );
@@ -278,7 +278,7 @@ public class AbandonRequestTest extends 
 
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AbandonRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
                 .openStream(), "UTF-8" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java Sun Feb  6 18:50:25 2011
@@ -74,7 +74,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_dn_attribute.xml" ).openStream(), "UTF-8" );
 
@@ -100,7 +100,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
                 "UTF-8" );
@@ -137,7 +137,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
@@ -171,7 +171,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 AddRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).openStream(), "UTF-8" );
@@ -206,7 +206,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_1_control_empty_value.xml" ).openStream(),
                 "UTF-8" );
@@ -241,7 +241,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(), "UTF-8" );
 
@@ -275,7 +275,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
                 .openStream(), "UTF-8" );
@@ -310,7 +310,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_without_value.xml" ).openStream(),
                 "UTF-8" );
@@ -347,7 +347,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_empty_value.xml" ).openStream(),
                 "UTF-8" );
@@ -384,7 +384,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_with_value.xml" ).openStream(),
                 "UTF-8" );
@@ -423,7 +423,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_with_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -463,7 +463,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_2_attr_with_value.xml" ).openStream(),
                 "UTF-8" );
@@ -516,7 +516,7 @@ public class AddRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_with_2_values.xml" ).openStream(),
                 "UTF-8" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java Sun Feb  6 18:50:25 2011
@@ -69,7 +69,7 @@ public class AuthRequestTest extends Abs
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AuthRequestTest.class.getResource( "request_with_principal_attribute.xml" ).openStream(),
                 "UTF-8" );
@@ -96,7 +96,7 @@ public class AuthRequestTest extends Abs
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AuthRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
                 "UTF-8" );
@@ -133,7 +133,7 @@ public class AuthRequestTest extends Abs
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AuthRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
@@ -167,7 +167,7 @@ public class AuthRequestTest extends Abs
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AuthRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -202,7 +202,7 @@ public class AuthRequestTest extends Abs
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 AuthRequestTest.class.getResource( "request_with_1_control_empty_value.xml" ).openStream(), "UTF-8" );
@@ -237,7 +237,7 @@ public class AuthRequestTest extends Abs
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AuthRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(), "UTF-8" );
 
@@ -271,7 +271,7 @@ public class AuthRequestTest extends Abs
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( AuthRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
                 .openStream(), "UTF-8" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java Sun Feb  6 18:50:25 2011
@@ -65,7 +65,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
                 "UTF-8" );
@@ -102,7 +102,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
                 "UTF-8" );
@@ -129,7 +129,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_AuthRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -165,7 +165,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_AddRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -201,7 +201,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_CompareRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -237,7 +237,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_AbandonRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -273,7 +273,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_DelRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -309,7 +309,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_ExtendedRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -345,7 +345,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_ModDNRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -381,7 +381,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_ModifyRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -417,7 +417,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_SearchRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -453,7 +453,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_2_AddRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -489,7 +489,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_2_CompareRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -525,7 +525,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_2_AbandonRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -561,7 +561,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_2_DelRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -597,7 +597,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_2_ExtendedRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -633,7 +633,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_2_ModDNRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -669,7 +669,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_2_ModifyRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -705,7 +705,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_2_SearchRequest.xml" ).openStream(),
                 "UTF-8" );
@@ -741,7 +741,7 @@ public class BatchRequestTest extends Ab
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( BatchRequestTest.class.getResource( "request_with_1_AuthRequest_1_AddRequest.xml" )
                 .openStream(), "UTF-8" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java Sun Feb  6 18:50:25 2011
@@ -70,7 +70,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( CompareRequestTest.class.getResource( "request_with_dn_attribute.xml" ).openStream(),
                 "UTF-8" );
@@ -97,7 +97,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( CompareRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
                 .openStream(), "UTF-8" );
@@ -134,7 +134,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser
                 .setInput( CompareRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
@@ -169,7 +169,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser
                 .setInput( CompareRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
@@ -204,7 +204,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( CompareRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
                 .openStream(), "UTF-8" );
@@ -239,7 +239,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( CompareRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(),
                 "UTF-8" );
@@ -274,7 +274,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( CompareRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
                 .openStream(), "UTF-8" );
@@ -309,7 +309,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( CompareRequestTest.class.getResource( "request_with_1_complete_assertion.xml" )
                 .openStream(), "UTF-8" );
@@ -340,7 +340,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( CompareRequestTest.class
                 .getResource( "request_with_1_complete_assertion_base64_value.xml" ).openStream(), "UTF-8" );
@@ -371,7 +371,7 @@ public class CompareRequestTest extends 
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( CompareRequestTest.class.getResource( "request_with_1_assertion_empty_value.xml" )
                 .openStream(), "UTF-8" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java Sun Feb  6 18:50:25 2011
@@ -69,7 +69,7 @@ public class DelRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( DelRequestTest.class.getResource( "request_with_dn_attribute.xml" ).openStream(), "UTF-8" );
 
@@ -95,7 +95,7 @@ public class DelRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( DelRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
                 "UTF-8" );
@@ -132,7 +132,7 @@ public class DelRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( DelRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
@@ -166,7 +166,7 @@ public class DelRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 DelRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).openStream(), "UTF-8" );
@@ -201,7 +201,7 @@ public class DelRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( DelRequestTest.class.getResource( "request_with_1_control_empty_value.xml" ).openStream(),
                 "UTF-8" );
@@ -236,7 +236,7 @@ public class DelRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( DelRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(), "UTF-8" );
 
@@ -270,7 +270,7 @@ public class DelRequestTest extends Abst
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( DelRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
                 .openStream(), "UTF-8" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java Sun Feb  6 18:50:25 2011
@@ -60,7 +60,7 @@ public class ExtendedRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ExtendedRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
                 .openStream(), "UTF-8" );
@@ -97,7 +97,7 @@ public class ExtendedRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ExtendedRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(),
                 "UTF-8" );
@@ -132,7 +132,7 @@ public class ExtendedRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ExtendedRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -167,7 +167,7 @@ public class ExtendedRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ExtendedRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
                 .openStream(), "UTF-8" );
@@ -202,7 +202,7 @@ public class ExtendedRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ExtendedRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(),
                 "UTF-8" );
@@ -237,7 +237,7 @@ public class ExtendedRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ExtendedRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
                 .openStream(), "UTF-8" );
@@ -272,7 +272,7 @@ public class ExtendedRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ExtendedRequestTest.class.getResource( "request_with_requestValue.xml" ).openStream(),
                 "UTF-8" );
@@ -299,7 +299,7 @@ public class ExtendedRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ExtendedRequestTest.class.getResource( "request_with_base64_requestValue.xml" )
                 .openStream(), "UTF-8" );
@@ -356,7 +356,7 @@ public class ExtendedRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ExtendedRequestTest.class.getResource( "request_with_empty_requestValue.xml" )
                 .openStream(), "UTF-8" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java Sun Feb  6 18:50:25 2011
@@ -59,7 +59,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
                 .openStream(), "UTF-8" );
@@ -96,7 +96,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(),
                 "UTF-8" );
@@ -131,7 +131,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -166,7 +166,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
                 .openStream(), "UTF-8" );
@@ -201,7 +201,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(),
                 "UTF-8" );
@@ -236,7 +236,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
                 .openStream(), "UTF-8" );
@@ -291,7 +291,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_dn_and_newrdn_attributes.xml" )
                 .openStream(), "UTF-8" );
@@ -320,7 +320,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_true.xml" ).openStream(), "UTF-8" );
@@ -347,7 +347,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_1.xml" ).openStream(),
                 "UTF-8" );
@@ -374,7 +374,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_false.xml" )
                 .openStream(), "UTF-8" );
@@ -401,7 +401,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_0.xml" ).openStream(),
                 "UTF-8" );
@@ -438,7 +438,7 @@ public class ModifyDNRequestTest extends
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_newSuperior_attribute.xml" )
                 .openStream(), "UTF-8" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java Sun Feb  6 18:50:25 2011
@@ -67,7 +67,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 ModifyRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(), "UTF-8" );
@@ -104,7 +104,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
@@ -138,7 +138,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -173,7 +173,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
                 .openStream(), "UTF-8" );
@@ -208,7 +208,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser
                 .setInput( ModifyRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(), "UTF-8" );
@@ -243,7 +243,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
                 .openStream(), "UTF-8" );
@@ -289,7 +289,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_modification.xml" ).openStream(),
                 "UTF-8" );
@@ -327,7 +327,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_modification_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -370,7 +370,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_2_modifications.xml" ).openStream(),
                 "UTF-8" );
@@ -438,7 +438,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_operation_add.xml" ).openStream(),
                 "UTF-8" );
@@ -471,7 +471,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_operation_delete.xml" ).openStream(),
                 "UTF-8" );
@@ -504,7 +504,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_operation_replace.xml" ).openStream(),
                 "UTF-8" );
@@ -547,7 +547,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_modification_without_value.xml" )
                 .openStream(), "UTF-8" );
@@ -584,7 +584,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_modification_with_2_values.xml" )
                 .openStream(), "UTF-8" );
@@ -624,7 +624,7 @@ public class ModifyRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( ModifyRequestTest.class.getResource( "request_with_modification_with_empty_value.xml" )
                 .openStream(), "UTF-8" );

Modified: directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java (original)
+++ directory/shared/branches/m1/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java Sun Feb  6 18:50:25 2011
@@ -86,7 +86,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_dn_attribute.xml" ).openStream(),
                 "UTF-8" );
@@ -113,7 +113,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 SearchRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(), "UTF-8" );
@@ -150,7 +150,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
@@ -184,7 +184,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -219,7 +219,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
                 .openStream(), "UTF-8" );
@@ -254,7 +254,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser
                 .setInput( SearchRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(), "UTF-8" );
@@ -289,7 +289,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
                 .openStream(), "UTF-8" );
@@ -345,7 +345,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_scope_baseObject.xml" ).openStream(),
                 "UTF-8" );
@@ -373,7 +373,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_scope_singleLevel.xml" ).openStream(),
                 "UTF-8" );
@@ -401,7 +401,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_scope_wholeSubtree.xml" ).openStream(),
                 "UTF-8" );
@@ -449,7 +449,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_derefAliases_derefAlways.xml" )
                 .openStream(), "UTF-8" );
@@ -477,7 +477,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_derefAliases_derefFindingBaseObj.xml" )
                 .openStream(), "UTF-8" );
@@ -505,7 +505,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_derefAliases_derefInSearching.xml" )
                 .openStream(), "UTF-8" );
@@ -533,7 +533,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_derefAliases_neverDerefAliases.xml" )
                 .openStream(), "UTF-8" );
@@ -572,7 +572,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 SearchRequestTest.class.getResource( "request_with_sizeLimit_attribute.xml" ).openStream(), "UTF-8" );
@@ -611,7 +611,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 SearchRequestTest.class.getResource( "request_with_timeLimit_attribute.xml" ).openStream(), "UTF-8" );
@@ -649,7 +649,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_typesOnly_true.xml" ).openStream(),
                 "UTF-8" );
@@ -676,7 +676,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_typesOnly_1.xml" ).openStream(),
                 "UTF-8" );
@@ -703,7 +703,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_typesOnly_false.xml" ).openStream(),
                 "UTF-8" );
@@ -730,7 +730,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_typesOnly_0.xml" ).openStream(),
                 "UTF-8" );
@@ -777,7 +777,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_attributes_but_no_attribute.xml" )
                 .openStream(), "UTF-8" );
@@ -813,7 +813,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_attributes_1_attribute.xml" )
                 .openStream(), "UTF-8" );
@@ -845,7 +845,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "request_with_attributes_2_attribute.xml" )
                 .openStream(), "UTF-8" );
@@ -899,7 +899,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_and.xml" ).openStream(),
                 "UTF-8" );
@@ -928,7 +928,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser
                 .setInput( SearchRequestTest.class.getResource( "filters/request_with_or.xml" ).openStream(), "UTF-8" );
@@ -957,7 +957,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_not.xml" ).openStream(),
                 "UTF-8" );
@@ -996,7 +996,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 SearchRequestTest.class.getResource( "filters/request_with_approxMatch.xml" ).openStream(), "UTF-8" );
@@ -1031,7 +1031,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_approxMatch_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -1066,7 +1066,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_approxMatch_with_empty_value.xml" ).openStream(), "UTF-8" );
@@ -1131,7 +1131,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_greaterOrEqual.xml" )
                 .openStream(), "UTF-8" );
@@ -1166,7 +1166,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_greaterOrEqual_base64_value.xml" ).openStream(), "UTF-8" );
@@ -1201,7 +1201,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_greaterOrEqual_with_empty_value.xml" ).openStream(), "UTF-8" );
@@ -1266,7 +1266,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput(
                 SearchRequestTest.class.getResource( "filters/request_with_lessOrEqual.xml" ).openStream(), "UTF-8" );
@@ -1301,7 +1301,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_lessOrEqual_base64_value.xml" )
                 .openStream(), "UTF-8" );
@@ -1336,7 +1336,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_lessOrEqual_with_empty_value.xml" ).openStream(), "UTF-8" );
@@ -1401,7 +1401,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_equalityMatch.xml" )
                 .openStream(), "UTF-8" );
@@ -1435,7 +1435,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class
                 .getResource( "filters/request_with_equalityMatch_base64_value.xml" ).openStream(), "UTF-8" );
@@ -1470,7 +1470,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_equalityMatch_with_empty_value.xml" ).openStream(), "UTF-8" );
@@ -1535,7 +1535,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_present.xml" ).openStream(),
                 "UTF-8" );
@@ -1578,7 +1578,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_extensibleMatch.xml" )
                 .openStream(), "UTF-8" );
@@ -1613,7 +1613,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_extensibleMatch_base64_value.xml" ).openStream(), "UTF-8" );
@@ -1648,7 +1648,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_extensibleMatch_with_empty_value.xml" ).openStream(), "UTF-8" );
@@ -1703,7 +1703,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_extensibleMatch_with_dnAttributes_true.xml" ).openStream(), "UTF-8" );
@@ -1736,7 +1736,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_extensibleMatch_with_dnAttributes_1.xml" ).openStream(), "UTF-8" );
@@ -1769,7 +1769,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_extensibleMatch_with_dnAttributes_false.xml" ).openStream(), "UTF-8" );
@@ -1802,7 +1802,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_extensibleMatch_with_dnAttributes_0.xml" ).openStream(), "UTF-8" );
@@ -1845,7 +1845,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_extensibleMatch_with_matchingRule.xml" ).openStream(), "UTF-8" );
@@ -1878,7 +1878,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_extensibleMatch_with_name.xml" )
                 .openStream(), "UTF-8" );
@@ -1911,7 +1911,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings.xml" ).openStream(),
                 "UTF-8" );
@@ -1954,7 +1954,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_1_initial.xml" )
                 .openStream(), "UTF-8" );
@@ -1987,7 +1987,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_substrings_1_base64_initial.xml" ).openStream(), "UTF-8" );
@@ -2020,7 +2020,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class
                 .getResource( "filters/request_with_substrings_1_empty_initial.xml" ).openStream(), "UTF-8" );
@@ -2053,7 +2053,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class
                 .getResource( "filters/request_with_substrings_1_initial_1_any.xml" ).openStream(), "UTF-8" );
@@ -2092,7 +2092,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource(
                 "filters/request_with_substrings_1_initial_1_final.xml" ).openStream(), "UTF-8" );
@@ -2127,7 +2127,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_1_any.xml" )
                 .openStream(), "UTF-8" );
@@ -2163,7 +2163,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_1_base64_any.xml" )
                 .openStream(), "UTF-8" );
@@ -2199,7 +2199,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_1_empty_any.xml" )
                 .openStream(), "UTF-8" );
@@ -2234,7 +2234,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_2_any.xml" )
                 .openStream(), "UTF-8" );
@@ -2273,7 +2273,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_1_any_1_final.xml" )
                 .openStream(), "UTF-8" );
@@ -2312,7 +2312,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_1_final.xml" )
                 .openStream(), "UTF-8" );
@@ -2345,7 +2345,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_1_base64_final.xml" )
                 .openStream(), "UTF-8" );
@@ -2378,7 +2378,7 @@ public class SearchRequestTest extends A
         Dsmlv2Parser parser = null;
         try
         {
-            parser = new Dsmlv2Parser( getCodec() );
+            parser = newParser();
 
             parser.setInput( SearchRequestTest.class.getResource( "filters/request_with_substrings_1_empty_final.xml" )
                 .openStream(), "UTF-8" );

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/AttributeValueAssertion.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/AttributeValueAssertion.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/AttributeValueAssertion.java (original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/AttributeValueAssertion.java Sun Feb  6 18:50:25 2011
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.codec;
 
+
 import org.apache.directory.shared.ldap.model.entry.*;
 import org.apache.directory.shared.util.Strings;
 

Modified: directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java?rev=1067726&r1=1067725&r2=1067726&view=diff
==============================================================================
--- directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java (original)
+++ directory/studio/branches/m1/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlRunnable.java Sun Feb  6 18:50:25 2011
@@ -50,6 +50,7 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.reponse.ModDNResponseDsml;
 import org.apache.directory.shared.dsmlv2.reponse.ModifyResponseDsml;
 import org.apache.directory.shared.dsmlv2.request.BatchRequestDsml;
+import org.apache.directory.shared.dsmlv2.request.Dsmlv2Grammar;
 import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
 import org.apache.directory.shared.ldap.codec.LdapCodecService;
 import org.apache.directory.shared.ldap.model.entry.*;
@@ -193,7 +194,8 @@ public class ImportDsmlRunnable implemen
         try
         {
             // Parsing the file
-            Dsmlv2Parser parser = new Dsmlv2Parser( codec );
+            Dsmlv2Grammar grammar = new Dsmlv2Grammar( codec );
+            Dsmlv2Parser parser = new Dsmlv2Parser( grammar );
             parser.setInput( new FileInputStream( dsmlFile ), "UTF-8" );
             parser.parseAllRequests();
 



Mime
View raw message