jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1299184 - in /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit: json/JsonValue.java security/AuthenticatorImpl.java state/ChangeLog.java state/PersistentNodeState.java state/TransientNodeState.java
Date Sat, 10 Mar 2012 12:01:23 GMT
Author: mduerig
Date: Sat Mar 10 12:01:23 2012
New Revision: 1299184

URL: http://svn.apache.org/viewvc?rev=1299184&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
- cleanup

Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/security/AuthenticatorImpl.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java?rev=1299184&r1=1299183&r2=1299184&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java
Sat Mar 10 12:01:23 2012
@@ -307,9 +307,9 @@ public abstract class JsonValue {
      * {@link Type#STRING} {@link Type#NUMBER} {@link Type#BOOLEAN} and {@link Type#NULL}.
      */
     public static class JsonAtom extends JsonValue {
-        public static JsonAtom NULL = new JsonAtom("null", Type.NULL);
-        public static JsonAtom TRUE = new JsonAtom("true", Type.BOOLEAN);
-        public static JsonAtom FALSE = new JsonAtom("false", Type.BOOLEAN);
+        public static final JsonAtom NULL = new JsonAtom("null", Type.NULL);
+        public static final JsonAtom TRUE = new JsonAtom("true", Type.BOOLEAN);
+        public static final JsonAtom FALSE = new JsonAtom("false", Type.BOOLEAN);
 
         private final String value;
         private final Type type;

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/security/AuthenticatorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/security/AuthenticatorImpl.java?rev=1299184&r1=1299183&r2=1299184&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/security/AuthenticatorImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/security/AuthenticatorImpl.java
Sat Mar 10 12:01:23 2012
@@ -56,7 +56,7 @@ public class AuthenticatorImpl implement
             };
         }
         else if (credentials instanceof SimpleCredentials) {
-            final SimpleCredentials c = ((SimpleCredentials) credentials);
+            final SimpleCredentials c = (SimpleCredentials) credentials;
             Arrays.fill(c.getPassword(), '\0');
             return new CredentialsInfo() {
                 @Override

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java?rev=1299184&r1=1299183&r2=1299184&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java
Sat Mar 10 12:01:23 2012
@@ -293,7 +293,7 @@ public class ChangeLog {
      * (leading star) in order to avoid conflicts with node names.
      */
     static final class Operation {
-        public static Operation ID = new Operation(NIL, NIL, null);
+        public static final Operation ID = new Operation(NIL, NIL, null);
 
         private final Path from;
         private final Path to;

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java?rev=1299184&r1=1299183&r2=1299184&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/PersistentNodeState.java
Sat Mar 10 12:01:23 2012
@@ -20,9 +20,9 @@ import java.util.Iterator;
 import java.util.Map.Entry;
 
 public class PersistentNodeState extends AbstractNodeState {
-    private MicroKernel microkernel;
-    private String revision;
-    private Path path;
+    private final MicroKernel microkernel;
+    private final String revision;
+    private final Path path;
 
     public PersistentNodeState(MicroKernel microkernel, String revision, Path path) {
         this.microkernel = microkernel;
@@ -82,7 +82,7 @@ public class PersistentNodeState extends
         return new Iterable<ChildNodeEntry>() {
             private final JsonObject jsonObject = getNodesAsJson(offset, length);
 
-            Iterator<Entry<String, JsonValue>> childObjects =
+            private final Iterator<Entry<String, JsonValue>> childObjects =
                 Iterators.filterIterator(jsonObject.value().entrySet().iterator(),
                     new Predicate<Entry<String, JsonValue>>() {
                         @Override
@@ -91,13 +91,14 @@ public class PersistentNodeState extends
                         }
                     });
 
-            Iterator<ChildNodeEntry> childNodeEntry = Iterators.transformIterator(childObjects,
-                new Transformer<Entry<String, JsonValue>, ChildNodeEntry>() {
-                    @Override
-                    public ChildNodeEntry transform(Entry<String, JsonValue> entry)
{
-                        return createChildNodeEntry(entry.getKey());
-                    }
-                });
+            private final Iterator<ChildNodeEntry> childNodeEntry =
+                Iterators.transformIterator(childObjects,
+                    new Transformer<Entry<String, JsonValue>, ChildNodeEntry>()
{
+                        @Override
+                        public ChildNodeEntry transform(Entry<String, JsonValue> entry)
{
+                            return createChildNodeEntry(entry.getKey());
+                        }
+                    });
 
             @Override
             public Iterator<ChildNodeEntry> iterator() {

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java?rev=1299184&r1=1299183&r2=1299184&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java
Sat Mar 10 12:01:23 2012
@@ -226,10 +226,6 @@ public class TransientNodeState {
         return state;
     }
 
-    private static boolean isNode(JsonValue value) {
-        return value.isObject();
-    }
-
     private JsonValue getPropertyValueOrNull(String name) {
         JsonValue value = getNodeDelta().getProperty(name);
         if (value == null) {



Mime
View raw message