jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r423073 - /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
Date Tue, 18 Jul 2006 12:33:54 GMT
Author: jukka
Date: Tue Jul 18 05:33:53 2006
New Revision: 423073

URL: http://svn.apache.org/viewvc?rev=423073&view=rev
Log:
JCR-472: Wrap IllegalArgumentException from UUID when bad ID passed to Session.getNodeByUUID

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/SessionImpl.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/SessionImpl.java?rev=423073&r1=423072&r2=423073&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
Tue Jul 18 05:33:53 2006
@@ -752,7 +752,12 @@
      * {@inheritDoc}
      */
     public Node getNodeByUUID(String uuid) throws ItemNotFoundException, RepositoryException
{
-        return getNodeByUUID(UUID.fromString(uuid));
+        try {
+            return getNodeByUUID(UUID.fromString(uuid));
+        } catch (IllegalArgumentException e) {
+            // Assuming the exception is from UUID.fromString()
+            throw new RepositoryException("Invalid UUID: " + uuid, e);
+        }
     }
 
     /**



Mime
View raw message