jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1104041 - in /jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: JcrVersionManager.java state/Status.java util/LogUtil.java util/StateUtility.java
Date Tue, 17 May 2011 07:50:04 GMT
Author: angela
Date: Tue May 17 07:50:03 2011
New Revision: 1104041

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

Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/Status.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/LogUtil.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java?rev=1104041&r1=1104040&r2=1104041&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrVersionManager.java
Tue May 17 07:50:03 2011
@@ -173,7 +173,7 @@ public class JcrVersionManager implement
     public void restore(String absPath, Version version, boolean removeExisting) throws PathNotFoundException,
ItemExistsException, VersionException, ConstraintViolationException, UnsupportedRepositoryOperationException,
LockException, InvalidItemStateException, RepositoryException {
         session.checkIsAlive();
         // get parent
-        int idx = absPath.lastIndexOf("/");
+        int idx = absPath.lastIndexOf('/');
         String parent = idx == 0 ? "/" : absPath.substring(0, idx);
         String name = absPath.substring(idx + 1);
         Node n = itemManager.getNode(resolver.getQPath(parent));

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/Status.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/Status.java?rev=1104041&r1=1104040&r2=1104041&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/Status.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/Status.java
Tue May 17 07:50:03 2011
@@ -21,6 +21,11 @@ package org.apache.jackrabbit.jcr2spi.st
  */
 public final class Status {
 
+    /**
+     * Avoid instantiation
+     */
+    private Status() {}
+
     public static final int _UNDEFINED_ = -1;
 
     /**

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/LogUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/LogUtil.java?rev=1104041&r1=1104040&r2=1104041&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/LogUtil.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/LogUtil.java
Tue May 17 07:50:03 2011
@@ -31,11 +31,16 @@ import javax.jcr.NamespaceException;
 /**
  * <code>LogUtil</code>...
  */
-public class LogUtil {
+public final class LogUtil {
 
     private static Logger log = LoggerFactory.getLogger(LogUtil.class);
 
     /**
+     * Avoid instantiation
+     */
+    private LogUtil() {}
+
+    /**
      * Failsafe conversion of internal <code>Path</code> to JCR path for use
in
      * error messages etc.
      *

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java?rev=1104041&r1=1104040&r2=1104041&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java
Tue May 17 07:50:03 2011
@@ -29,7 +29,12 @@ import javax.jcr.RepositoryException;
 /**
  * <code>StateUtility</code>...
  */
-public class StateUtility {
+public final class StateUtility {
+
+    /**
+     * Avoid instantiation
+     */
+    private StateUtility() {}
 
     /**
      *



Mime
View raw message