jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1450851 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeBits.java
Date Wed, 27 Feb 2013 17:10:28 GMT
Author: angela
Date: Wed Feb 27 17:10:28 2013
New Revision: 1450851

URL: http://svn.apache.org/r1450851
Log:
OAK-64: privilege mgt (minor improvement)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeBits.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeBits.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeBits.java?rev=1450851&r1=1450850&r2=1450851&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeBits.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeBits.java
Wed Feb 27 17:10:28 2013
@@ -66,7 +66,6 @@ public final class PrivilegeBits impleme
     public static final PrivilegeBits EMPTY = new PrivilegeBits(UnmodifiableData.EMPTY);
 
     static final Map<String, PrivilegeBits> BUILT_IN = new HashMap<String, PrivilegeBits>();
-
     static {
         BUILT_IN.put(REP_READ_NODES, getInstance(READ_NODES));
         BUILT_IN.put(REP_READ_PROPERTIES, getInstance(READ_PROPERTIES));
@@ -99,6 +98,8 @@ public final class PrivilegeBits impleme
 
     /**
      * Private constructor.
+     *
+     * @param d The data that backs this instance.
      */
     private PrivilegeBits(Data d) {
         this.d = d;
@@ -187,7 +188,6 @@ public final class PrivilegeBits impleme
         }
     }
 
-
     /**
      * Internal method to create a new instance of {@code PrivilegeBits}.
      *
@@ -525,10 +525,9 @@ public final class PrivilegeBits impleme
     /**
      * Immutable Data object
      */
-    private static class UnmodifiableData extends Data {
+    private static final class UnmodifiableData extends Data {
 
         private static final long MAX = Long.MAX_VALUE / 2;
-
         private static final UnmodifiableData EMPTY = new UnmodifiableData(NO_PRIVILEGE);
 
         private final long bits;
@@ -610,7 +609,7 @@ public final class PrivilegeBits impleme
         //---------------------------------------------------------< Object >---
         @Override
         public int hashCode() {
-            return (isSimple) ? new Long(bits).hashCode() : Arrays.hashCode(bitsArr);
+            return (isSimple) ? Long.valueOf(bits).hashCode() : Arrays.hashCode(bitsArr);
         }
 
         @Override
@@ -636,7 +635,7 @@ public final class PrivilegeBits impleme
     /**
      * Mutable implementation of the Data base class.
      */
-    private static class ModifiableData extends Data {
+    private static final class ModifiableData extends Data {
 
         private long[] bits;
 



Mime
View raw message