jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1336736 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core: ContentSessionImpl.java RootImpl.java TreeImpl.java
Date Thu, 10 May 2012 15:03:07 GMT
Author: thomasm
Date: Thu May 10 15:03:06 2012
New Revision: 1336736

URL: http://svn.apache.org/viewvc?rev=1336736&view=rev
Log:
OAK-98 Source code formatting, code conventions, Javadocs

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java?rev=1336736&r1=1336735&r2=1336736&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
Thu May 10 15:03:06 2012
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.oak.core;
 
-import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.oak.api.AuthInfo;
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.CoreValueFactory;
@@ -74,7 +73,7 @@ class ContentSessionImpl implements Cont
             }
         };
     }
-    
+
     @Override
     public Root getCurrentRoot() {
         return new RootImpl(store, workspaceName);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java?rev=1336736&r1=1336735&r2=1336736&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
Thu May 10 15:03:06 2012
@@ -150,8 +150,7 @@ public class RootImpl implements Root {
         if (mergeChanges) {
             oldBase = base;
             oldHead = nodeStateBuilder.getNodeState();
-        }
-        else {
+        } else {
             oldBase = null;
             oldHead = null;
         }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java?rev=1336736&r1=1336735&r2=1336736&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Thu May 10 15:03:06 2012
@@ -182,40 +182,34 @@ public class TreeImpl implements Tree {
             if (hasProperty(name)) {
                 // ...so all children are new
                 return Status.NEW;
-            }
-            else {
+            } else {
                 // ...unless they don't exist.
                 return null;
             }
-        }
-        else {
+        } else {
             if (hasProperty(name)) {
                 // We have the property...
                 if (baseState.getProperty(name) == null) {
                     // ...but didn't have it before. So its NEW.
                     return Status.NEW;
-                }
-                else {
+                } else {
                     // ... and did have it before. So...
                     PropertyState base = baseState.getProperty(name);
                     PropertyState head = getProperty(name);
                     if (base.equals(head)) {
                         // ...it's EXISTING if it hasn't changed
                         return Status.EXISTING;
-                    }
-                    else {
+                    } else {
                         // ...and MODIFIED otherwise.
                         return Status.MODIFIED;
                     }
                 }
-            }
-            else {
+            } else {
                 // We don't have the property
                 if (baseState.getProperty(name) == null) {
                     // ...and didn't have it before. So it doesn't exist.
                     return null;
-                }
-                else {
+                } else {
                     // ...and didn't have it before. So it's REMOVED
                     return Status.REMOVED;
                 }
@@ -265,38 +259,32 @@ public class TreeImpl implements Tree {
             if (hasChild(name)) {
                 // ...so all children are new
                 return Status.NEW;
-            }
-            else {
+            } else {
                 // ...unless they don't exist.
                 return null;
             }
-        }
-        else {
+        } else {
             if (hasChild(name)) {
                 // We have the child...
                 if (baseState.getChildNode(name) == null) {
                     // ...but didn't have it before. So its NEW.
                     return Status.NEW;
-                }
-                else {
+                } else {
                     // ... and did have it before. So...
                     if (isSame(baseState.getChildNode(name), getNodeState().getChildNode(name)))
{
                         // ...it's EXISTING if it hasn't changed
                         return Status.EXISTING;
-                    }
-                    else {
+                    } else {
                         // ...and MODIFIED otherwise.
                         return Status.MODIFIED;
                     }
                 }
-            }
-            else {
+            } else {
                 // We don't have the child
                 if (baseState.getChildNode(name) == null) {
                     // ...and didn't have it before. So it doesn't exist.
                     return null;
-                }
-                else {
+                } else {
                     // ...and didn't have it before. So it's REMOVED
                     return Status.REMOVED;
                 }
@@ -519,8 +507,7 @@ public class TreeImpl implements Tree {
             writeLock.lock();
             try {
                 children.put(name, tree);
-            }
-            finally {
+            } finally {
                 writeLock.unlock();
             }
         }
@@ -529,8 +516,7 @@ public class TreeImpl implements Tree {
             readLock.lock();
             try {
                 return children.get(name);
-            }
-            finally {
+            } finally {
                 readLock.unlock();
             }
         }
@@ -539,8 +525,7 @@ public class TreeImpl implements Tree {
             writeLock.lock();
             try {
                 children.remove(name);
-            }
-            finally {
+            } finally {
                 writeLock.unlock();
             }
         }



Mime
View raw message