directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r224581 - in /directory/sandbox/trunk/asn1-new-codec/src: java/org/apache/asn1/ldap/pojo/filters/ test/org/apache/asn1/ldap/codec/
Date Sat, 23 Jul 2005 23:13:49 GMT
Author: elecharny
Date: Sat Jul 23 16:13:40 2005
New Revision: 224581

URL: http://svn.apache.org/viewcvs?rev=224581&view=rev
Log:
- replaced MutableString by LdapString everywhere.
- fixed a test where '*' was expected by a 't' was returned.

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/ExtensibleMatchFilter.java
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/PresentFilter.java
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/SubstringFilter.java
    directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/ExtensibleMatchFilter.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/ExtensibleMatchFilter.java?rev=224581&r1=224580&r2=224581&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/ExtensibleMatchFilter.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/ExtensibleMatchFilter.java
Sat Jul 23 16:13:40 2005
@@ -16,8 +16,8 @@
  */
 package org.apache.asn1.ldap.pojo.filters;
 
+import org.apache.asn1.ldap.codec.primitives.LdapString;
 import org.apache.asn1.primitives.OctetString;
-import org.apache.asn1.util.MutableString;
 
 
 /**
@@ -34,10 +34,10 @@
     private int expectedMatchingRuleLength;
 
     /** Matching rule  */
-    private MutableString matchingRule;
+    private LdapString matchingRule;
 
     /** Matching rule type */
-    private MutableString type;
+    private LdapString type;
 
     /** Matching rule value */
     private OctetString matchValue;
@@ -83,7 +83,7 @@
      *
      * @return Returns the matchingRule.
      */
-    public MutableString getMatchingRule()
+    public LdapString getMatchingRule()
     {
         return matchingRule;
     }
@@ -93,7 +93,7 @@
      *
      * @param matchingRule The matchingRule to set.
      */
-    public void setMatchingRule( MutableString matchingRule )
+    public void setMatchingRule( LdapString matchingRule )
     {
         this.matchingRule = matchingRule;
     }
@@ -123,7 +123,7 @@
      *
      * @return Returns the type.
      */
-    public MutableString getType()
+    public LdapString getType()
     {
         return type;
     }
@@ -133,7 +133,7 @@
      *
      * @param type The type to set.
      */
-    public void setType( MutableString type )
+    public void setType( LdapString type )
     {
         this.type = type;
     }

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/PresentFilter.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/PresentFilter.java?rev=224581&r1=224580&r2=224581&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/PresentFilter.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/PresentFilter.java
Sat Jul 23 16:13:40 2005
@@ -17,7 +17,6 @@
 package org.apache.asn1.ldap.pojo.filters;
 
 import org.apache.asn1.ldap.codec.primitives.LdapString;
-import org.apache.asn1.util.MutableString;
 
 
 /**
@@ -48,7 +47,7 @@
      *
      * @return Returns the attributeDescription.
      */
-    public MutableString getAttributeDescription()
+    public LdapString getAttributeDescription()
     {
         return attributeDescription;
     }

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/SubstringFilter.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/SubstringFilter.java?rev=224581&r1=224580&r2=224581&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/SubstringFilter.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/filters/SubstringFilter.java
Sat Jul 23 16:13:40 2005
@@ -20,7 +20,6 @@
 import java.util.Iterator;
 
 import org.apache.asn1.ldap.codec.primitives.LdapString;
-import org.apache.asn1.util.MutableString;
 
 
 /**
@@ -78,7 +77,7 @@
      *
      * @param anySubstrings The anySubstrings to set.
      */
-    public void addAnySubstrings( MutableString anySubstrings )
+    public void addAnySubstrings( LdapString anySubstrings )
     {
         this.anySubstrings.add(anySubstrings);
     }
@@ -88,7 +87,7 @@
      *
      * @return Returns the finalSubstrings.
      */
-    public MutableString getFinalSubstrings()
+    public LdapString getFinalSubstrings()
     {
         return finalSubstrings;
     }
@@ -108,7 +107,7 @@
      *
      * @return Returns the initialSubstrings.
      */
-    public MutableString getInitialSubstrings()
+    public LdapString getInitialSubstrings()
     {
         return initialSubstrings;
     }
@@ -128,7 +127,7 @@
      *
      * @return Returns the type.
      */
-    public MutableString getType()
+    public LdapString getType()
     {
         return type;
     }

Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java?rev=224581&r1=224580&r2=224581&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/SearchRequestTest.java
Sat Jul 23 16:13:40 2005
@@ -22,6 +22,7 @@
 import org.apache.asn1.DecoderException;
 import org.apache.asn1.ber.Asn1Decoder;
 import org.apache.asn1.ber.containers.IAsn1Container;
+import org.apache.asn1.ldap.codec.primitives.LdapString;
 import org.apache.asn1.ldap.pojo.AttributeValueAssertion;
 import org.apache.asn1.ldap.pojo.LdapMessage;
 import org.apache.asn1.ldap.pojo.SearchRequest;
@@ -31,7 +32,6 @@
 import org.apache.asn1.ldap.pojo.filters.OrFilter;
 import org.apache.asn1.ldap.pojo.filters.PresentFilter;
 import org.apache.asn1.ldap.pojo.filters.SubstringFilter;
-import org.apache.asn1.util.MutableString;
 import org.apache.log4j.Logger;
 import org.apache.log4j.PropertyConfigurator;
 
@@ -192,7 +192,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -340,7 +340,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -476,7 +476,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -569,7 +569,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -656,7 +656,7 @@
         
         Assert.assertEquals("objectclass", substringFilter.getType().toString());
         Assert.assertEquals(null, substringFilter.getInitialSubstrings());
-        Assert.assertEquals("t", ((MutableString)substringFilter.getAnySubstrings().get(0)).toString());
+        Assert.assertEquals("t", ((LdapString)substringFilter.getAnySubstrings().get(0)).toString());
         Assert.assertEquals(null, substringFilter.getFinalSubstrings());
 
         // The attributes
@@ -664,7 +664,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -752,7 +752,7 @@
         
         Assert.assertEquals("objectclass", substringFilter.getType().toString());
         Assert.assertEquals(null, substringFilter.getInitialSubstrings());
-        Assert.assertEquals("t", ((MutableString)substringFilter.getAnySubstrings().get(0)).toString());
+        Assert.assertEquals("t", ((LdapString)substringFilter.getAnySubstrings().get(0)).toString());
         Assert.assertEquals("t", substringFilter.getFinalSubstrings().toString());
 
         // The attributes
@@ -760,7 +760,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -849,7 +849,7 @@
         
         Assert.assertEquals("objectclass", substringFilter.getType().toString());
         Assert.assertEquals("t", substringFilter.getInitialSubstrings().toString());
-        Assert.assertEquals("t", ((MutableString)substringFilter.getAnySubstrings().get(0)).toString());
+        Assert.assertEquals("t", ((LdapString)substringFilter.getAnySubstrings().get(0)).toString());
         Assert.assertEquals("t", substringFilter.getFinalSubstrings().toString());
 
         // The attributes
@@ -857,7 +857,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -945,15 +945,14 @@
         
         Assert.assertEquals("objectclass", substringFilter.getType().toString());
         Assert.assertEquals("t", substringFilter.getInitialSubstrings().toString());
-        Assert.assertEquals("*", ((MutableString)substringFilter.getAnySubstrings().get(0)).toString());
+        Assert.assertEquals("t", ((LdapString)substringFilter.getAnySubstrings().get(0)).toString());
 
-        sr.toString();
         // The attributes
         ArrayList attributes = sr.getAttributes();
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -1042,8 +1041,8 @@
         
         Assert.assertEquals("objectclass", substringFilter.getType().toString());
         Assert.assertEquals(null, substringFilter.getInitialSubstrings());
-        Assert.assertEquals("t", ((MutableString)substringFilter.getAnySubstrings().get(0)).toString());
-        Assert.assertEquals("t", ((MutableString)substringFilter.getAnySubstrings().get(1)).toString());
+        Assert.assertEquals("t", ((LdapString)substringFilter.getAnySubstrings().get(0)).toString());
+        Assert.assertEquals("t", ((LdapString)substringFilter.getAnySubstrings().get(1)).toString());
         Assert.assertEquals("t", substringFilter.getFinalSubstrings().toString());
 
         // The attributes
@@ -1051,7 +1050,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -1139,14 +1138,14 @@
         
         Assert.assertEquals("objectclass", substringFilter.getType().toString());
         Assert.assertEquals("t", substringFilter.getInitialSubstrings().toString());
-        Assert.assertEquals("*", ((MutableString)substringFilter.getAnySubstrings().get(0)).toString());
+        Assert.assertEquals("*", ((LdapString)substringFilter.getAnySubstrings().get(0)).toString());
 
         // The attributes
         ArrayList attributes = sr.getAttributes();
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -1235,9 +1234,9 @@
         
         Assert.assertEquals("objectclass", substringFilter.getType().toString());
         Assert.assertEquals(null, substringFilter.getInitialSubstrings());
-        Assert.assertEquals("t", ((MutableString)substringFilter.getAnySubstrings().get(0)).toString());
-        Assert.assertEquals("t", ((MutableString)substringFilter.getAnySubstrings().get(1)).toString());
-        Assert.assertEquals("t", ((MutableString)substringFilter.getAnySubstrings().get(2)).toString());
+        Assert.assertEquals("t", ((LdapString)substringFilter.getAnySubstrings().get(0)).toString());
+        Assert.assertEquals("t", ((LdapString)substringFilter.getAnySubstrings().get(1)).toString());
+        Assert.assertEquals("t", ((LdapString)substringFilter.getAnySubstrings().get(2)).toString());
         Assert.assertEquals(null, substringFilter.getFinalSubstrings());
 
         // The attributes
@@ -1245,7 +1244,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -1358,7 +1357,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }
@@ -1429,7 +1428,7 @@
         
         for (int i = 0; i < attributes.size(); i++) 
         {
-            MutableString attribute = (MutableString)attributes.get(i);
+            LdapString attribute = (LdapString)attributes.get(i);
             
             Assert.assertEquals("attr" + i, attribute.toString());
         }



Mime
View raw message