directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r951693 - in /directory/apacheds/trunk: jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ xdbm-partition/src/main/java/org/apache/director...
Date Sat, 05 Jun 2010 11:50:00 GMT
Author: seelmann
Date: Sat Jun  5 11:50:00 2010
New Revision: 951693

URL: http://svn.apache.org/viewvc?rev=951693&view=rev
Log:
Avoid 'ST: Write to static field from instance method'

Modified:
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=951693&r1=951692&r2=951693&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Sat Jun  5 11:50:00 2010
@@ -112,10 +112,10 @@ public class JdbmStore<E> extends Abstra
         this.schemaManager = schemaManager;
 
         // Initialize Attribute types used all over this method
-        OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT
);
-        ALIASED_OBJECT_NAME_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ALIASED_OBJECT_NAME_AT
);
-        ENTRY_CSN_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_CSN_AT
);
-        ENTRY_UUID_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_UUID_AT
);
+        objectClassAT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT
);
+        aliasedObjectNameAT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ALIASED_OBJECT_NAME_AT
);
+        entryCsnAT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_CSN_AT
);
+        entryUuidAT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_UUID_AT
);
 
         partitionDir.mkdirs();
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=951693&r1=951692&r2=951693&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
Sat Jun  5 11:50:00 2010
@@ -71,11 +71,11 @@ public abstract class AbstractStore<E, I
     /** The default cache size is set to 10 000 objects */
     public static final int DEFAULT_CACHE_SIZE = 10000;
 
-    /** Static declarations to avoid lookup all over the code */
-    protected static AttributeType OBJECT_CLASS_AT;
-    protected static AttributeType ENTRY_CSN_AT;
-    protected static AttributeType ENTRY_UUID_AT;
-    protected static AttributeType ALIASED_OBJECT_NAME_AT;
+    /** Cached attributes types to avoid lookup all over the code */
+    protected AttributeType objectClassAT;
+    protected AttributeType entryCsnAT;
+    protected AttributeType entryUuidAT;
+    protected AttributeType aliasedObjectNameAT;
 
     /** true if initialized */
     protected boolean initialized;
@@ -813,7 +813,7 @@ public abstract class AbstractStore<E, I
 
         rdnIdx.add( key, id );
 
-        EntryAttribute objectClass = entry.get( OBJECT_CLASS_AT );
+        EntryAttribute objectClass = entry.get( objectClassAT );
 
         if ( objectClass == null )
         {
@@ -834,7 +834,7 @@ public abstract class AbstractStore<E, I
 
         if ( objectClass.contains( SchemaConstants.ALIAS_OC ) )
         {
-            EntryAttribute aliasAttr = entry.get( ALIASED_OBJECT_NAME_AT );
+            EntryAttribute aliasAttr = entry.get( aliasedObjectNameAT );
             addAliasIndices( id, entryDn, aliasAttr.getString() );
         }
 
@@ -846,7 +846,7 @@ public abstract class AbstractStore<E, I
         oneLevelIdx.add( parentId, id );
 
         // Update the EntryCsn index
-        EntryAttribute entryCsn = entry.get( ENTRY_CSN_AT );
+        EntryAttribute entryCsn = entry.get( entryCsnAT );
 
         if ( entryCsn == null )
         {
@@ -857,7 +857,7 @@ public abstract class AbstractStore<E, I
         entryCsnIdx.add( entryCsn.getString(), id );
 
         // Update the EntryUuid index
-        EntryAttribute entryUuid = entry.get( ENTRY_UUID_AT );
+        EntryAttribute entryUuid = entry.get( entryUuidAT );
 
         if ( entryUuid == null )
         {
@@ -1007,7 +1007,7 @@ public abstract class AbstractStore<E, I
     {
         Entry entry = master.get( id );
 
-        EntryAttribute objectClass = entry.get( OBJECT_CLASS_AT );
+        EntryAttribute objectClass = entry.get( objectClassAT );
 
         if ( objectClass.contains( SchemaConstants.ALIAS_OC ) )
         {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java?rev=951693&r1=951692&r2=951693&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java
Sat Jun  5 11:50:00 2010
@@ -67,10 +67,10 @@ public class AvlStore<E> extends Abstrac
     {
         this.schemaManager = schemaManager;
 
-        OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT
);
-        ALIASED_OBJECT_NAME_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ALIASED_OBJECT_NAME_AT
);
-        ENTRY_CSN_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_CSN_AT
);
-        ENTRY_UUID_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_UUID_AT
);
+        objectClassAT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT
);
+        aliasedObjectNameAT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ALIASED_OBJECT_NAME_AT
);
+        entryCsnAT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_CSN_AT
);
+        entryUuidAT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ENTRY_UUID_AT
);
 
         // Create the master table (the table containing all the entries)
         master = new AvlMasterTable<Entry>( id, new LongComparator(), null, false );



Mime
View raw message