jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1079738 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/
Date Wed, 09 Mar 2011 10:55:26 GMT
Author: angela
Date: Wed Mar  9 10:55:25 2011
New Revision: 1079738

URL: http://svn.apache.org/viewvc?rev=1079738&view=rev
Log:
minor improvement

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalActivityImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFreezeImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalActivityImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalActivityImpl.java?rev=1079738&r1=1079737&r2=1079738&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalActivityImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalActivityImpl.java
Wed Mar  9 10:55:25 2011
@@ -51,6 +51,7 @@ class InternalActivityImpl extends Inter
     /**
      * {@inheritDoc}
      */
+    @Override
     public NodeId getId() {
         return node.getNodeId();
     }
@@ -58,6 +59,7 @@ class InternalActivityImpl extends Inter
     /**
      * {@inheritDoc}
      */
+    @Override
     public InternalVersionItem getParent() {
         return null;
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFreezeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFreezeImpl.java?rev=1079738&r1=1079737&r2=1079738&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFreezeImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFreezeImpl.java
Wed Mar  9 10:55:25 2011
@@ -41,6 +41,7 @@ abstract class InternalFreezeImpl extend
     /**
      * {@inheritDoc}
      */
+    @Override
     public InternalVersionItem getParent() {
         return parent;
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java?rev=1079738&r1=1079737&r2=1079738&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
Wed Mar  9 10:55:25 2011
@@ -136,6 +136,7 @@ class InternalFrozenNodeImpl extends Int
     /**
      * {@inheritDoc}
      */
+    @Override
     public NodeId getId() {
         return node.getNodeId();
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java?rev=1079738&r1=1079737&r2=1079738&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManagerImpl.java
Wed Mar  9 10:55:25 2011
@@ -246,6 +246,7 @@ public class InternalVersionManagerImpl 
      * This method must not be synchronized since it could cause deadlocks with
      * item-reading listeners in the observation thread.
      */
+    @Override
     protected VersionHistoryInfo createVersionHistory(Session session,
                   final NodeState node, final NodeId copiedFrom)
             throws RepositoryException {
@@ -301,6 +302,7 @@ public class InternalVersionManagerImpl 
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean hasItem(NodeId id) {
         VersioningLock.ReadLock lock = acquireReadLock();
         try {
@@ -313,6 +315,7 @@ public class InternalVersionManagerImpl 
     /**
      * {@inheritDoc}
      */
+    @Override
     protected InternalVersionItem getItem(NodeId id)
             throws RepositoryException {
 
@@ -501,6 +504,7 @@ public class InternalVersionManagerImpl 
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void itemDiscarded(InternalVersionItem item) {
         // evict removed item from cache
         VersioningLock.ReadLock lock = acquireReadLock();
@@ -514,6 +518,7 @@ public class InternalVersionManagerImpl 
     /**
      * {@inheritDoc}
      */
+    @Override
     protected boolean hasItemReferences(NodeId id)
             throws RepositoryException {
         return stateMgr.hasNodeReferences(id);
@@ -522,6 +527,7 @@ public class InternalVersionManagerImpl 
     /**
      * {@inheritDoc}
      */
+    @Override
     protected NodeStateEx getNodeStateEx(NodeId parentNodeId)
             throws RepositoryException {
         try {
@@ -537,6 +543,7 @@ public class InternalVersionManagerImpl 
      *
      * @return the version history root node
      */
+    @Override
     protected NodeStateEx getHistoryRoot() {
         return historyRoot;
     }
@@ -546,6 +553,7 @@ public class InternalVersionManagerImpl 
      *
      * @return the activities root node
      */
+    @Override
     protected NodeStateEx getActivitiesRoot() {
         return activitiesRoot;
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java?rev=1079738&r1=1079737&r2=1079738&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalXAVersionManager.java
Wed Mar  9 10:55:25 2011
@@ -156,6 +156,7 @@ public class InternalXAVersionManager ex
     /**
      * {@inheritDoc}
      */
+    @Override
     protected VersionHistoryInfo createVersionHistory(Session session,
                                                       NodeState node,
                                                       NodeId copiedFrom)
@@ -208,6 +209,7 @@ public class InternalXAVersionManager ex
      * <p/>
      * Before modifying activity, make a local copy of it.
      */
+    @Override
     protected void internalRemoveActivity(InternalActivityImpl activity)
             throws VersionException, RepositoryException {
         if (activity.getVersionManager() != this) {
@@ -404,6 +406,7 @@ public class InternalXAVersionManager ex
     /**
      * {@inheritDoc}
      */
+    @Override
     protected NodeStateEx getHistoryRoot() {
         return historyRoot;
     }
@@ -411,6 +414,7 @@ public class InternalXAVersionManager ex
     /**
      * {@inheritDoc}
      */
+    @Override
     protected NodeStateEx getActivitiesRoot() {
         return activitiesRoot;
     }
@@ -418,6 +422,7 @@ public class InternalXAVersionManager ex
     /**
      * {@inheritDoc}
      */
+     @Override
      protected InternalVersionItem getItem(NodeId id) throws RepositoryException {
         InternalVersionItem item = null;
         if (xaItems != null) {
@@ -432,6 +437,7 @@ public class InternalXAVersionManager ex
     /**
      * {@inheritDoc}
      */
+    @Override
     protected boolean hasItem(NodeId id) {
         if (xaItems != null && xaItems.containsKey(id)) {
             return true;
@@ -442,6 +448,7 @@ public class InternalXAVersionManager ex
     /**
      * {@inheritDoc}
      */
+    @Override
     protected boolean hasItemReferences(NodeId id)
             throws RepositoryException {
         return session.getNodeById(id).getReferences().hasNext();
@@ -450,6 +457,7 @@ public class InternalXAVersionManager ex
     /**
      * {@inheritDoc}
      */
+    @Override
     protected NodeStateEx getNodeStateEx(NodeId parentNodeId)
             throws RepositoryException {
         try {
@@ -490,6 +498,7 @@ public class InternalXAVersionManager ex
      * <p/>
      * Before modifying version history given, make a local copy of it.
      */
+    @Override
     protected void internalRemoveVersion(InternalVersionHistoryImpl history, Name name)
             throws VersionException, RepositoryException {
 
@@ -513,6 +522,7 @@ public class InternalXAVersionManager ex
      * <p/>
      * Before modifying version history given, make a local copy of it.
      */
+    @Override
     protected InternalVersion setVersionLabel(InternalVersionHistoryImpl history,
                                               Name version, Name label,
                                               boolean move)
@@ -530,6 +540,7 @@ public class InternalXAVersionManager ex
      * <p/>
      * Put the version object into our cache.
      */
+    @Override
     protected void versionCreated(InternalVersion version) {
         xaItems.put(version.getId(), version);
     }
@@ -539,6 +550,7 @@ public class InternalXAVersionManager ex
      * <p/>
      * Remove the version object from our cache.
      */
+    @Override
     protected void versionDestroyed(InternalVersion version) {
         xaItems.remove(version.getId());
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java?rev=1079738&r1=1079737&r2=1079738&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
Wed Mar  9 10:55:25 2011
@@ -271,6 +271,7 @@ public class VersionHistoryImpl extends 
     /**
      * @see javax.jcr.Item#isSame(javax.jcr.Item)
      */
+    @Override
     public boolean isSame(Item otherItem) {
         if (otherItem instanceof VersionHistoryImpl) {
             // since all version histories live in the same workspace, we can compare the
uuids
@@ -336,6 +337,7 @@ public class VersionHistoryImpl extends 
      *
      * @throws javax.jcr.nodetype.ConstraintViolationException
      */
+    @Override
     public void update(String srcWorkspaceName) throws ConstraintViolationException {
         String msg = "update operation not allowed: " + this;
         log.debug(msg);
@@ -348,6 +350,7 @@ public class VersionHistoryImpl extends 
      *
      * @throws javax.jcr.nodetype.ConstraintViolationException
      */
+    @Override
     public NodeIterator merge(String srcWorkspace, boolean bestEffort)
             throws ConstraintViolationException {
         String msg = "merge operation not allowed: " + this;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java?rev=1079738&r1=1079737&r2=1079738&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionImpl.java
Wed Mar  9 10:55:25 2011
@@ -157,6 +157,7 @@ public class VersionImpl extends NodeImp
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isSame(Item otherItem) {
         if (otherItem instanceof VersionImpl) {
             // since all versions live in the same workspace, we can compare the uuids
@@ -204,6 +205,7 @@ public class VersionImpl extends NodeImp
      *
      * @throws javax.jcr.nodetype.ConstraintViolationException
      */
+    @Override
     public void update(String srcWorkspaceName) throws ConstraintViolationException {
         String msg = "update operation not allowed: " + this;
         log.debug(msg);
@@ -216,6 +218,7 @@ public class VersionImpl extends NodeImp
      *
      * @throws javax.jcr.nodetype.ConstraintViolationException
      */
+    @Override
     public NodeIterator merge(String srcWorkspace, boolean bestEffort)
             throws ConstraintViolationException {
         String msg = "merge operation not allowed: " + this;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java?rev=1079738&r1=1079737&r2=1079738&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersioningLock.java
Wed Mar  9 10:55:25 2011
@@ -120,6 +120,7 @@ public class VersioningLock {
          * Allow reader when there is no active Xid, or current Xid owns
          * the write lock (reentrant).
          */
+        @Override
         protected boolean allowReader() {
             Xid currentXid = TransactionContext.getCurrentXid();
             return (activeXid == null && waitingWriters_ == 0) || isSameGlobalTx(currentXid);
@@ -128,6 +129,7 @@ public class VersioningLock {
         /**
          * {@inheritDoc}
          */
+        @Override
         protected synchronized boolean startWrite() {
             Xid currentXid = TransactionContext.getCurrentXid();
             if (activeXid != null && isSameGlobalTx(currentXid)) { // already held;
re-acquire
@@ -149,6 +151,7 @@ public class VersioningLock {
         /**
          * {@inheritDoc}
          */
+        @Override
         protected synchronized Signaller endWrite() {
             --writeHolds_;
             if (writeHolds_ > 0) {  // still being held
@@ -168,12 +171,13 @@ public class VersioningLock {
         /**
          * {@inheritDoc}
          */
+        @Override
         @SuppressWarnings("unchecked")
         protected synchronized boolean startRead() {
             Xid currentXid = TransactionContext.getCurrentXid();
             Object c = readers_.get(currentXid);
             if (c != null) { // already held -- just increment hold count
-                readers_.put(currentXid, new Integer(((Integer)(c)).intValue()+1));
+                readers_.put(currentXid, (Integer) (c) + 1);
                 ++activeReaders_;
                 return true;
             } else if (allowReader()) {
@@ -188,6 +192,7 @@ public class VersioningLock {
         /**
          * {@inheritDoc}
          */
+        @Override
         @SuppressWarnings("unchecked")
         protected synchronized Signaller endRead() {
             Xid currentXid = TransactionContext.getCurrentXid();
@@ -197,7 +202,7 @@ public class VersioningLock {
             }
             --activeReaders_;
             if (c != IONE) { // more than one hold; decrement count
-                int h = ((Integer)(c)).intValue()-1;
+                int h = (Integer) (c) -1;
                 Integer ih = (h == 1)? IONE : new Integer(h);
                 readers_.put(currentXid, ih);
                 return null;



Mime
View raw message