jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r513270 - in /jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav: ExceptionConverter.java IdFactoryImpl.java
Date Thu, 01 Mar 2007 10:50:23 GMT
Author: angela
Date: Thu Mar  1 02:50:22 2007
New Revision: 513270

URL: http://svn.apache.org/viewvc?view=rev&rev=513270
Log:
minor improvement
convert precondition failed to LockException

Modified:
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/ExceptionConverter.java
    jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/IdFactoryImpl.java

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/ExceptionConverter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/ExceptionConverter.java?view=diff&rev=513270&r1=513269&r2=513270
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/ExceptionConverter.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/ExceptionConverter.java
Thu Mar  1 02:50:22 2007
@@ -78,6 +78,7 @@
             case DavServletResponse.SC_LOCKED : return new LockException(msg);
             case DavServletResponse.SC_METHOD_NOT_ALLOWED : return new ConstraintViolationException(msg);
             case DavServletResponse.SC_CONFLICT : return new InvalidItemStateException(msg);
+            case DavServletResponse.SC_PRECONDITION_FAILED : return new LockException(msg);
             default: return new RepositoryException(msg);
         }
     }

Modified: jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/IdFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/IdFactoryImpl.java?view=diff&rev=513270&r1=513269&r2=513270
==============================================================================
--- jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/IdFactoryImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/IdFactoryImpl.java
Thu Mar  1 02:50:22 2007
@@ -122,8 +122,9 @@
         }
 
         boolean equals(ItemId other) {
-            return (uniqueID == null ? other.getUniqueID() == null : uniqueID.equals(other.getUniqueID()))
-                && (path == null ? other.getPath() == null : path.equals(other.getPath()));
+            boolean equalUniqueID = (uniqueID == null) ? other.getUniqueID() == null : uniqueID.equals(other.getUniqueID());
+            boolean equalPath = (path == null) ? other.getPath() == null : path.equals(other.getPath());
+            return equalUniqueID && equalPath;
         }
 
         /**
@@ -218,4 +219,4 @@
             return false;
         }
     }
-}
\ No newline at end of file
+}



Mime
View raw message