directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1770781 - in /directory/shared/trunk/ldap/model/src: main/java/org/apache/directory/api/ldap/model/message/controls/ main/java/org/apache/directory/api/ldap/model/name/ main/java/org/apache/directory/api/ldap/model/url/ test/java/org/apach...
Date Mon, 21 Nov 2016 23:23:16 GMT
Author: elecharny
Date: Mon Nov 21 23:23:16 2016
New Revision: 1770781

URL: http://svn.apache.org/viewvc?rev=1770781&view=rev
Log:
Using the Strings.EMPTY_BTES instead of the StringConstants.EMPTY_BYTES constant

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/AttributeTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueAttributeTypeTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/ValueSerializationTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/ldif/LdifControlSerializationTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/message/controls/OpaqueControlTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/OctetStringSyntaxCheckerTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/UuidSyntaxCheckerTest.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java
Mon Nov 21 23:23:16 2016
@@ -20,7 +20,6 @@
 package org.apache.directory.api.ldap.model.message.controls;
 
 
-import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 
 import java.util.Arrays;
@@ -63,7 +62,7 @@ public class PagedResultsImpl extends Ab
     private int size;
 
     /** The exchanged cookie */
-    private byte[] cookie = StringConstants.EMPTY_BYTES;
+    private byte[] cookie = Strings.EMPTY_BYTES;
 
 
     /**

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/Rdn.java
Mon Nov 21 23:23:16 2016
@@ -41,7 +41,6 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.util.Chars;
 import org.apache.directory.api.util.Hex;
 import org.apache.directory.api.util.Serialize;
-import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.api.util.Unicode;
 import org.slf4j.Logger;
@@ -1243,7 +1242,7 @@ public class Rdn implements Cloneable, E
             if ( chars.length == 1 )
             {
                 // The value is only containing a #
-                return StringConstants.EMPTY_BYTES;
+                return Strings.EMPTY_BYTES;
             }
 
             if ( ( chars.length % 2 ) != 1 )

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java
Mon Nov 21 23:23:16 2016
@@ -1034,7 +1034,7 @@ public class LdapUrl
     {
         if ( bytes == null )
         {
-            return StringConstants.EMPTY_BYTES;
+            return Strings.EMPTY_BYTES;
         }
 
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/AttributeTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/AttributeTest.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/AttributeTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/AttributeTest.java
Mon Nov 21 23:23:16 2016
@@ -38,7 +38,6 @@ import javax.naming.directory.InvalidAtt
 
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException;
-import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -641,10 +640,10 @@ public class AttributeTest
 
         Attribute attr2 = new DefaultAttribute( "test" );
 
-        nbAdded = attr2.add( StringConstants.EMPTY_BYTES );
+        nbAdded = attr2.add( Strings.EMPTY_BYTES );
         assertEquals( 1, nbAdded );
         assertFalse( attr2.isHumanReadable() );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, attr2.getBytes() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, attr2.getBytes() ) );
         assertEquals( 1, attr2.size() );
 
         Attribute attr3 = new DefaultAttribute( "test" );
@@ -1179,10 +1178,10 @@ public class AttributeTest
 
         Attribute attr2 = new DefaultAttribute( "test" );
 
-        nbAdded = attr2.add( StringConstants.EMPTY_BYTES );
+        nbAdded = attr2.add( Strings.EMPTY_BYTES );
         assertEquals( 1, nbAdded );
         assertFalse( attr2.isHumanReadable() );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, attr2.getBytes() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, attr2.getBytes() ) );
 
         Attribute attr3 = new DefaultAttribute( "test" );
 

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueAttributeTypeTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueAttributeTypeTest.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueAttributeTypeTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueAttributeTypeTest.java
Mon Nov 21 23:23:16 2016
@@ -43,7 +43,6 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.schema.Normalizer;
 import org.apache.directory.api.ldap.model.schema.comparators.ByteArrayComparator;
 import org.apache.directory.api.ldap.model.schema.syntaxCheckers.OctetStringSyntaxChecker;
-import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.junit.Before;
 import org.junit.Test;
@@ -252,9 +251,9 @@ public class BinaryValueAttributeTypeTes
     {
         AttributeType attribute = EntryUtils.getBytesAttributeType();
 
-        BinaryValue value = new BinaryValue( attribute, StringConstants.EMPTY_BYTES );
+        BinaryValue value = new BinaryValue( attribute, Strings.EMPTY_BYTES );
 
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, value.getReference() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, value.getReference() ) );
         assertFalse( value.isNull() );
     }
 
@@ -306,10 +305,10 @@ public class BinaryValueAttributeTypeTes
 
         assertEquals( bv, bv1 );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
 
         assertNotSame( bv, bv1 );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, bv.getBytes() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, bv.getBytes() ) );
 
         bv = new BinaryValue( BYTES2 );
         bv1 = bv.clone();
@@ -370,8 +369,8 @@ public class BinaryValueAttributeTypeTes
         BinaryValue value = new BinaryValue( attribute, null );
         assertNull( value.getNormValue() );
 
-        value = new BinaryValue( attribute, StringConstants.EMPTY_BYTES );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, value.getNormValue() ) );
+        value = new BinaryValue( attribute, Strings.EMPTY_BYTES );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, value.getNormValue() ) );
 
         value = new BinaryValue( attribute, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, value.getNormValue() ) );
@@ -389,8 +388,8 @@ public class BinaryValueAttributeTypeTes
         BinaryValue value = new BinaryValue( attribute, null );
         assertNull( value.getNormValue() );
 
-        value = new BinaryValue( attribute, StringConstants.EMPTY_BYTES );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, value.getNormValue() ) );
+        value = new BinaryValue( attribute, Strings.EMPTY_BYTES );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, value.getNormValue() ) );
 
         value = new BinaryValue( attribute, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, value.getNormValue() ) );
@@ -408,8 +407,8 @@ public class BinaryValueAttributeTypeTes
         BinaryValue value = new BinaryValue( attribute, null );
         assertNull( value.getNormReference() );
 
-        value = new BinaryValue( attribute, StringConstants.EMPTY_BYTES );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, value.getNormReference()
) );
+        value = new BinaryValue( attribute, Strings.EMPTY_BYTES );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, value.getNormReference() ) );
 
         value = new BinaryValue( attribute, BYTES2 );
         assertTrue( Arrays.equals( BYTES1, value.getNormReference() ) );
@@ -440,7 +439,7 @@ public class BinaryValueAttributeTypeTes
         AttributeType attribute = EntryUtils.getBytesAttributeType();
 
         new BinaryValue( attribute, null );
-        new BinaryValue( attribute, StringConstants.EMPTY_BYTES );
+        new BinaryValue( attribute, Strings.EMPTY_BYTES );
         new BinaryValue( attribute, new byte[]
             { 0x01, 0x02 } );
 
@@ -515,9 +514,9 @@ public class BinaryValueAttributeTypeTes
         bv.apply( at );
         assertEquals( null, bv.getNormValue() );
 
-        bv = new BinaryValue( attribute, StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( attribute, Strings.EMPTY_BYTES );
         bv.apply( at );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, bv.getNormValue() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, bv.getNormValue() ) );
 
         bv = new BinaryValue( attribute, BYTES2 );
         bv.apply( at );
@@ -639,13 +638,13 @@ public class BinaryValueAttributeTypeTes
     public void testEmptyBinaryValueSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         // First check with a value which will be normalized
-        BinaryValue sbv = new BinaryValue( at, StringConstants.EMPTY_BYTES );
+        BinaryValue sbv = new BinaryValue( at, Strings.EMPTY_BYTES );
 
         sbv.apply( at );
         byte[] normalized = sbv.getNormReference();
 
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, normalized ) );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, sbv.getBytes() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, normalized ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, sbv.getBytes() ) );
 
         BinaryValue sbvSer = deserializeValue( serializeValue( sbv ), at );
 

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueTest.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueTest.java
Mon Nov 21 23:23:16 2016
@@ -42,7 +42,6 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
 import org.apache.directory.api.ldap.model.schema.comparators.ByteArrayComparator;
 import org.apache.directory.api.ldap.model.schema.syntaxCheckers.OctetStringSyntaxChecker;
-import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.junit.Before;
 import org.junit.Test;
@@ -226,8 +225,8 @@ public class BinaryValueTest
         BinaryValue bv = new BinaryValue( ( byte[] ) null );
         assertEquals( 0, bv.hashCode() );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
-        int h = Arrays.hashCode( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
+        int h = Arrays.hashCode( Strings.EMPTY_BYTES );
         assertEquals( h, bv.hashCode() );
 
         h = Arrays.hashCode( BYTES1 );
@@ -252,17 +251,17 @@ public class BinaryValueTest
     @Test
     public void testBinaryValueEmpty() throws LdapException
     {
-        BinaryValue cbv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        BinaryValue cbv = new BinaryValue( Strings.EMPTY_BYTES );
 
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, cbv.getBytes() ) );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, cbv.getValue() ) );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, cbv.getReference() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, cbv.getBytes() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, cbv.getValue() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, cbv.getReference() ) );
         assertFalse( cbv.isSchemaAware() );
         assertTrue( cbv.isValid( BINARY_CHECKER ) );
         assertFalse( cbv.isNull() );
         assertNotNull( cbv.getNormValue() );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, cbv.getNormValue() ) );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, cbv.getNormReference() )
);
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, cbv.getNormValue() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, cbv.getNormReference() ) );
     }
 
 
@@ -331,11 +330,11 @@ public class BinaryValueTest
         assertTrue( bv.isSchemaAware() );
         assertEquals( null, bv.getNormValue() );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         bv.apply( at );
         assertTrue( bv.isSchemaAware() );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, bv.getBytes() ) );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, bv.getNormValue() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, bv.getBytes() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, bv.getNormValue() ) );
 
         bv = new BinaryValue( BYTES1 );
         bv.apply( at );
@@ -423,9 +422,9 @@ public class BinaryValueTest
 
         assertNull( bv.getValue() );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         assertNotNull( bv.getValue() );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, bv.getValue() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, bv.getValue() ) );
 
         bv = new BinaryValue( BYTES1 );
         byte[] copy = bv.getValue();
@@ -476,7 +475,7 @@ public class BinaryValueTest
 
         assertEquals( "null", bv.toString() );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         assertEquals( "", bv.toString() );
 
         bv = new BinaryValue( BYTES1 );
@@ -491,9 +490,9 @@ public class BinaryValueTest
 
         assertNull( bv.getReference() );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         assertNotNull( bv.getReference() );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, bv.getReference() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, bv.getReference() ) );
 
         bv = new BinaryValue( BYTES1 );
         byte[] reference = bv.getReference();
@@ -513,9 +512,9 @@ public class BinaryValueTest
 
         assertNull( bv.getValue() );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         assertNotNull( bv.getValue() );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, bv.getBytes() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, bv.getBytes() ) );
 
         bv = new BinaryValue( BYTES1 );
         byte[] get = bv.getBytes();
@@ -577,7 +576,7 @@ public class BinaryValueTest
 
         assertTrue( bv.isNull() );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         assertFalse( bv.isNull() );
 
         bv = new BinaryValue( BYTES1 );
@@ -592,7 +591,7 @@ public class BinaryValueTest
 
         assertTrue( bv.isValid( BINARY_CHECKER ) );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         assertTrue( bv.isValid( BINARY_CHECKER ) );
 
         bv = new BinaryValue( BYTES1 );
@@ -612,7 +611,7 @@ public class BinaryValueTest
 
         assertTrue( bv.isValid( BINARY_CHECKER ) );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         assertTrue( bv.isValid( BINARY_CHECKER ) );
 
         bv = new BinaryValue( BYTES1 );
@@ -632,10 +631,10 @@ public class BinaryValueTest
         assertTrue( bv.isSchemaAware() );
         assertEquals( null, bv.getNormValue() );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         bv.apply( at );
         assertTrue( bv.isSchemaAware() );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, bv.getNormValue() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, bv.getNormValue() ) );
 
         bv = new BinaryValue( BYTES2 );
         bv.apply( at );
@@ -655,9 +654,9 @@ public class BinaryValueTest
         assertTrue( bv.isValid( BINARY_CHECKER ) );
         assertTrue( bv.isNull() );
 
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         assertNotNull( bv.getValue() );
-        assertTrue( Arrays.equals( StringConstants.EMPTY_BYTES, bv.getBytes() ) );
+        assertTrue( Arrays.equals( Strings.EMPTY_BYTES, bv.getBytes() ) );
         assertFalse( bv.isSchemaAware() );
         assertTrue( bv.isValid( BINARY_CHECKER ) );
         assertFalse( bv.isNull() );
@@ -794,7 +793,7 @@ public class BinaryValueTest
     public void testSerializeEmptyValue() throws LdapException, IOException, ClassNotFoundException
     {
         BinaryValue bv = new BinaryValue( ( byte[] ) null );
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         bv.isValid( BINARY_CHECKER );
         bv.apply( at );
 
@@ -813,7 +812,7 @@ public class BinaryValueTest
     public void testSerializeEmptyValueNotNormalized() throws LdapException, IOException,
ClassNotFoundException
     {
         BinaryValue bv = new BinaryValue( ( byte[] ) null );
-        bv = new BinaryValue( StringConstants.EMPTY_BYTES );
+        bv = new BinaryValue( Strings.EMPTY_BYTES );
         bv.isValid( BINARY_CHECKER );
 
         BinaryValue cbvSer = deserializeValue( null, serializeValue( bv ) );

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/ValueSerializationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/ValueSerializationTest.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/ValueSerializationTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/ValueSerializationTest.java
Mon Nov 21 23:23:16 2016
@@ -35,7 +35,6 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.schema.comparators.StringComparator;
 import org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.api.ldap.model.schema.syntaxCheckers.OctetStringSyntaxChecker;
-import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.junit.Before;
 import org.junit.Ignore;
@@ -58,10 +57,10 @@ public class ValueSerializationTest
     private static byte[] data = new byte[]
         { 0x01, 0x02, 0x03, 0x04 };
     BinaryValue bv1 = new BinaryValue( data );
-    BinaryValue bv2 = new BinaryValue( StringConstants.EMPTY_BYTES );
+    BinaryValue bv2 = new BinaryValue( Strings.EMPTY_BYTES );
     BinaryValue bv3 = new BinaryValue( ( byte[] ) null );
     BinaryValue bv1n = new BinaryValue( data );
-    BinaryValue bv2n = new BinaryValue( StringConstants.EMPTY_BYTES );
+    BinaryValue bv2n = new BinaryValue( Strings.EMPTY_BYTES );
     BinaryValue bv3n = new BinaryValue( ( byte[] ) null );
     StringValue sv1 = new StringValue( "test" );
     StringValue sv2 = new StringValue( "" );

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/ldif/LdifControlSerializationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/ldif/LdifControlSerializationTest.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/ldif/LdifControlSerializationTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/ldif/LdifControlSerializationTest.java
Mon Nov 21 23:23:16 2016
@@ -31,7 +31,7 @@ import java.io.ObjectOutputStream;
 import org.apache.directory.api.ldap.model.ldif.LdifControl;
 import org.apache.directory.api.ldap.model.message.Control;
 import org.apache.directory.api.ldap.model.message.controls.OpaqueControl;
-import org.apache.directory.api.util.StringConstants;
+import org.apache.directory.api.util.Strings;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -71,7 +71,7 @@ public class LdifControlSerializationTes
 
         controlCriticalEmptyData = new OpaqueControl( "1.2.3.4.3" );
         controlCriticalEmptyData.setCritical( true );
-        ( ( OpaqueControl ) controlCriticalEmptyData ).setEncodedValue( StringConstants.EMPTY_BYTES
);
+        ( ( OpaqueControl ) controlCriticalEmptyData ).setEncodedValue( Strings.EMPTY_BYTES
);
 
         controlNoCriticalWithData = new OpaqueControl( "1.2.3.4.4" );
         controlNoCriticalWithData.setCritical( false );

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/message/controls/OpaqueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/message/controls/OpaqueControlTest.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/message/controls/OpaqueControlTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/message/controls/OpaqueControlTest.java
Mon Nov 21 23:23:16 2016
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 
 import org.apache.directory.api.ldap.model.message.controls.OpaqueControl;
-import org.apache.directory.api.util.StringConstants;
+import org.apache.directory.api.util.Strings;
 import org.junit.Test;
 
 
@@ -41,7 +41,7 @@ public class OpaqueControlTest
 
         assertFalse( control.hasEncodedValue() );
 
-        control.setEncodedValue( StringConstants.EMPTY_BYTES );
+        control.setEncodedValue( Strings.EMPTY_BYTES );
 
         assertTrue( control.hasEncodedValue() );
     }

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/OctetStringSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/OctetStringSyntaxCheckerTest.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/OctetStringSyntaxCheckerTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/OctetStringSyntaxCheckerTest.java
Mon Nov 21 23:23:16 2016
@@ -26,7 +26,7 @@ import com.mycila.junit.concurrent.Concu
 import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 
 import org.apache.directory.api.ldap.model.schema.syntaxCheckers.OctetStringSyntaxChecker;
-import org.apache.directory.api.util.StringConstants;
+import org.apache.directory.api.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -53,7 +53,7 @@ public class OctetStringSyntaxCheckerTes
     @Test
     public void testEmptyOctetString()
     {
-        assertTrue( checker.isValidSyntax( StringConstants.EMPTY_BYTES ) );
+        assertTrue( checker.isValidSyntax( Strings.EMPTY_BYTES ) );
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/UuidSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/UuidSyntaxCheckerTest.java?rev=1770781&r1=1770780&r2=1770781&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/UuidSyntaxCheckerTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/syntaxes/UuidSyntaxCheckerTest.java
Mon Nov 21 23:23:16 2016
@@ -27,7 +27,6 @@ import com.mycila.junit.concurrent.Concu
 import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 
 import org.apache.directory.api.ldap.model.schema.syntaxCheckers.UuidSyntaxChecker;
-import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -55,7 +54,7 @@ public class UuidSyntaxCheckerTest
     @Test
     public void testEmptyUuid()
     {
-        assertFalse( checker.isValidSyntax( StringConstants.EMPTY_BYTES ) );
+        assertFalse( checker.isValidSyntax( Strings.EMPTY_BYTES ) );
     }
 
 



Mime
View raw message