directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1074367 - in /directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model: ldif/LdifControl.java name/Rdn.java
Date Fri, 25 Feb 2011 00:54:17 GMT
Author: elecharny
Date: Fri Feb 25 00:54:16 2011
New Revision: 1074367

URL: http://svn.apache.org/viewvc?rev=1074367&view=rev
Log:
o Removed one useless usage of the transient keyword
o Changed an AtomicBoolean to a boolean, as the class is immutable

Modified:
    directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifControl.java
    directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java

Modified: directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifControl.java?rev=1074367&r1=1074366&r2=1074367&view=diff
==============================================================================
--- directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifControl.java
(original)
+++ directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifControl.java
Fri Feb 25 00:54:16 2011
@@ -32,11 +32,6 @@ import org.apache.directory.shared.util.
  */
 public class LdifControl implements Control
 {
-    /** The serial version UID */
-    private static final long serialVersionUID = 1L;
-
-    // ~ Instance fields
-    // ----------------------------------------------------------------------------
     /** The control type */
     private String oid;
 

Modified: directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java?rev=1074367&r1=1074366&r2=1074367&view=diff
==============================================================================
--- directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
(original)
+++ directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
Fri Feb 25 00:54:16 2011
@@ -28,7 +28,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.commons.collections.MultiMap;
 import org.apache.commons.collections.map.MultiValueMap;
@@ -184,7 +183,7 @@ public final class Rdn implements Clonea
     public static final int EQUAL = 0;
 
     /** A flag used to tell if the Rdn has been normalized */
-    private AtomicBoolean normalized = new AtomicBoolean();
+    private boolean normalized = false;
 
     /** the schema manager */
     private SchemaManager schemaManager;
@@ -213,7 +212,7 @@ public final class Rdn implements Clonea
         this.schemaManager = schemaManager;
         upName = "";
         normName = "";
-        normalized.set( false );
+        normalized = false;
     }
 
 
@@ -237,12 +236,12 @@ public final class Rdn implements Clonea
             {
                 this.schemaManager = schemaManager;
                 normalize( schemaManager );
-                normalized.set( true );
+                normalized = true;
             }
             else
             {
                 normalize();
-                normalized.set( false );
+                normalized = false;
             }
 
             upName = rdn;
@@ -251,7 +250,7 @@ public final class Rdn implements Clonea
         {
             upName = "";
             normName = "";
-            normalized.set( false );
+            normalized = false;
         }
     }
 
@@ -294,12 +293,12 @@ public final class Rdn implements Clonea
 
         if( schemaManager != null )
         {
-            normalized.set( true );
+            normalized = true;
         }
         else
         {
             // As strange as it seems, the Rdn is *not* normalized against the schema at
this point
-            normalized.set( false );
+            normalized = false;
         }
     }
 
@@ -341,7 +340,7 @@ public final class Rdn implements Clonea
         {
             this.schemaManager = schemaManager;
             normalize( schemaManager );
-            normalized.set( true );
+            normalized = true;
         }
         else
         {
@@ -349,7 +348,7 @@ public final class Rdn implements Clonea
             normalize();
 
             // As strange as it seems, the Rdn is *not* normalized against the schema at
this point
-            normalized.set( false );
+            normalized = false;
         }
     }
 
@@ -380,7 +379,7 @@ public final class Rdn implements Clonea
     {
         this.upName = upName;
         this.normName = normName;
-        normalized.set( true );
+        normalized = true;
     }
 
 
@@ -395,7 +394,7 @@ public final class Rdn implements Clonea
         nbAtavs = rdn.getNbAtavs();
         this.normName = rdn.normName;
         this.upName = rdn.getName();
-        normalized.set(rdn.normalized.get());
+        normalized = rdn.normalized;
 
         switch ( rdn.getNbAtavs() )
         {
@@ -490,7 +489,7 @@ public final class Rdn implements Clonea
      */
     public Rdn normalize( SchemaManager schemaManager ) throws LdapInvalidDnException
     {
-        if ( normalized.get() )
+        if ( normalized )
         {
             return this;
         }
@@ -501,7 +500,7 @@ public final class Rdn implements Clonea
             Dn.rdnOidToName( this, schemaManager.getNormalizerMapping() );
             normalize();
             this.upName = savedUpName;
-            normalized.set( true );
+            normalized = true;
     
             return this;
         }
@@ -644,7 +643,7 @@ public final class Rdn implements Clonea
         nbAtavs = 0;
         normName = "";
         upName = "";
-        normalized.set( false );
+        normalized = false;
     }
 
 
@@ -797,7 +796,7 @@ public final class Rdn implements Clonea
         try
         {
             Rdn rdn = (Rdn) super.clone();
-            rdn.normalized = new AtomicBoolean( normalized.get() );
+            rdn.normalized = normalized;
 
             // The AttributeTypeAndValue is immutable. We won't clone it
 
@@ -1382,7 +1381,7 @@ public final class Rdn implements Clonea
      */
     public boolean isNormalized()
     {
-        return normalized.get();
+        return normalized;
     }
 
 



Mime
View raw message