directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r438509 - in /directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap: codec/Control.java codec/util/LdapString.java message/ManageDsaITControl.java
Date Wed, 30 Aug 2006 15:01:21 GMT
Author: elecharny
Date: Wed Aug 30 08:01:20 2006
New Revision: 438509

URL: http://svn.apache.org/viewvc?rev=438509&view=rev
Log:
Deleted the EMPTY_BYTES declaration and used the one in StringTools

Modified:
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapString.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ManageDsaITControl.java

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java?rev=438509&r1=438508&r2=438509&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java
(original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java
Wed Aug 30 08:01:20 2006
@@ -57,10 +57,6 @@
     /** The control length */
     private transient int controlLength;
 
-    private static final byte[] EMPTY_BYTES = new byte[]
-        {};
-
-
     // ~ Methods
     // ------------------------------------------------------------------------------------
 
@@ -96,7 +92,7 @@
     {
         if ( controlValue == null )
         {
-            return EMPTY_BYTES;
+            return StringTools.EMPTY_BYTES;
         }
         else if ( controlValue instanceof String )
         {
@@ -130,7 +126,7 @@
     {
         if ( encodedValue == null )
         {
-            return EMPTY_BYTES;
+            return StringTools.EMPTY_BYTES;
         }
 
         return encodedValue;

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapString.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapString.java?rev=438509&r1=438508&r2=438509&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapString.java
(original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapString.java
Wed Aug 30 08:01:20 2006
@@ -22,6 +22,8 @@
 
 import java.io.UnsupportedEncodingException;
 
+import org.apache.directory.shared.ldap.util.StringTools;
+
 
 /**
  * Decodes a LdapString, and checks that the character set used comply the ISO
@@ -34,10 +36,6 @@
     /** A null LdapString */
     public transient static final LdapString EMPTY_STRING = new LdapString();
 
-    /** A null LdapString */
-    public transient static final byte[] EMPTY_BYTES = new byte[]
-        {};
-
     /** The inner String containing the LdapString */
     protected String string;
 
@@ -50,7 +48,7 @@
      */
     public LdapString()
     {
-        bytes = EMPTY_BYTES;
+        bytes = StringTools.EMPTY_BYTES;
         string = "";
     }
 

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ManageDsaITControl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ManageDsaITControl.java?rev=438509&r1=438508&r2=438509&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ManageDsaITControl.java
(original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ManageDsaITControl.java
Wed Aug 30 08:01:20 2006
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.util.StringTools;
+
 
 /**
  * Control which allows for the management of referrals and other DSA specific
@@ -64,15 +66,12 @@
 
     private static final long serialVersionUID = -8844249964346248321L;
 
-    private final static byte[] EMPTY_BYTES = new byte[0];
-
-
     /**
      * Returns an empty byte[] everytime.
      */
     public byte[] getEncodedValue()
     {
-        return EMPTY_BYTES;
+        return StringTools.EMPTY_BYTES;
     }
 
 
@@ -81,7 +80,7 @@
      */
     public byte[] getValue()
     {
-        return EMPTY_BYTES;
+        return StringTools.EMPTY_BYTES;
     }
 
 



Mime
View raw message