directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r1083583 - in /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model: filter/ message/ message/controls/ schema/ schema/registries/
Date Sun, 20 Mar 2011 21:45:23 GMT
Author: felixk
Date: Sun Mar 20 21:45:22 2011
New Revision: 1083583

URL: http://svn.apache.org/viewvc?rev=1083583&view=rev
Log:
Some findbugs performance hints

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/AbstractSchemaLoader.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java?rev=1083583&r1=1083582&r2=1083583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java
Sun Mar 20 21:45:22 2011
@@ -136,7 +136,7 @@ public class BranchNormalizedVisitor imp
         return result.toString().trim();
     }
 
-    class NodeComparator implements Comparator<ExprNode>
+    static class NodeComparator implements Comparator<ExprNode>
     {
         public int compare( ExprNode o1, ExprNode o2 )
         {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java?rev=1083583&r1=1083582&r2=1083583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/AbstractAbandonableRequest.java
Sun Mar 20 21:45:22 2011
@@ -96,7 +96,7 @@ public class AbstractAbandonableRequest 
 
 
     // False positive
-    class RequestObservable extends Observable
+    static class RequestObservable extends Observable
     {
         @Override
         public void setChanged()

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java?rev=1083583&r1=1083582&r2=1083583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/message/controls/EntryChangeImpl.java
Sun Mar 20 21:45:22 2011
@@ -93,7 +93,7 @@ public class EntryChangeImpl extends Abs
     {
         int h = super.hashCode();
 
-        h = h * 37 + new Long( changeNumber ).intValue();
+        h = h * 37 + Long.valueOf( changeNumber ).intValue();
         h = h * 37 + ( changeType == null ? 0 : changeType.hashCode() );
         h = h * 37 + ( previousDn == null ? 0 : previousDn.hashCode() );
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java?rev=1083583&r1=1083582&r2=1083583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/AbstractSchemaObject.java
Sun Mar 20 21:45:22 2011
@@ -551,16 +551,16 @@ public abstract class AbstractSchemaObje
         {
             this.extensions = new HashMap<String, List<String>>();
 
-            for ( String key : extensions.keySet() )
+            for ( Map.Entry<String, List<String>> entry : extensions.entrySet()
)
             {
                 List<String> values = new ArrayList<String>();
 
-                for ( String value : extensions.get( key ) )
+                for ( String value : entry.getValue() )
                 {
                     values.add( value );
                 }
 
-                this.extensions.put( key, values );
+                this.extensions.put( entry.getKey(), values );
             }
 
         }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java?rev=1083583&r1=1083582&r2=1083583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/SchemaUtils.java
Sun Mar 20 21:45:22 2011
@@ -674,11 +674,11 @@ public final class SchemaUtils
             return buf;
         }
 
-        for ( String key : extensions.keySet() )
+        for ( Map.Entry<String, List<String>>entry : extensions.entrySet() )
         {
-            buf.append( " " ).append( key ).append( " " );
+            buf.append( " " ).append( entry.getKey() ).append( " " );
 
-            List<String> values = extensions.get( key );
+            List<String> values = entry.getValue();
 
             // For extensions without values like X-IS-HUMAN-READIBLE
             if ( values == null || values.isEmpty() )

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/AbstractSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/AbstractSchemaLoader.java?rev=1083583&r1=1083582&r2=1083583&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/AbstractSchemaLoader.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/AbstractSchemaLoader.java
Sun Mar 20 21:45:22 2011
@@ -59,7 +59,7 @@ public abstract class AbstractSchemaLoad
     /**
      * a map implementation which converts the keys to lower case before inserting
      */
-    private class LowerCaseKeyMap extends HashMap<String,Schema>
+    private static class LowerCaseKeyMap extends HashMap<String,Schema>
     {
         private static final long serialVersionUID = 1L;
 



Mime
View raw message