directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r801327 - /directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
Date Wed, 05 Aug 2009 17:28:17 GMT
Author: elecharny
Date: Wed Aug  5 17:28:17 2009
New Revision: 801327

URL: http://svn.apache.org/viewvc?rev=801327&view=rev
Log:
Added a isSame() method

Modified:
    directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java

Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java?rev=801327&r1=801326&r2=801327&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
(original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
Wed Aug  5 17:28:17 2009
@@ -64,9 +64,6 @@
     /** reference to the attributeType which is not serialized */
     private transient AttributeType attributeType;
 
-    /** A flag set if the normalized data is different from the wrapped data */
-    private transient boolean same;
-
 
     // -----------------------------------------------------------------------
     // utility methods
@@ -191,35 +188,28 @@
             return;
         }
         
-        if ( getReference() != null )
+        if ( wrapped != null )
         {
             Normalizer normalizer = getNormalizer();
     
             if ( normalizer == null )
             {
-                normalizedValue = getCopy();
-                setNormalized( false );
-            }
-            else
-            {
-                normalizedValue = normalizer.normalize( this ).getBytes();
-                setNormalized( true );
-            }
-            
-            if ( Arrays.equals( super.getReference(), normalizedValue ) )
-            {
+                normalizedValue = wrapped;
+                normalized = false;
                 same = true;
             }
             else
             {
-                same = false;
+                normalizedValue = normalizer.normalize( this ).getBytes();
+                normalized = true;
+                same = Arrays.equals( wrapped, normalizedValue );
             }
         }
         else
         {
             normalizedValue = null;
             same = true;
-            setNormalized( false );
+            normalized = false;
         }
     }
 
@@ -365,15 +355,6 @@
         
         return valid;
     }
-
-    
-    /**
-     * @return Tells if the wrapped value and the normalized value are the same 
-     */
-    public final boolean isSame()
-    {
-        return same;
-    }
     
 
     /**



Mime
View raw message