jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1173168 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/CommitMessage.java
Date Tue, 20 Sep 2011 14:35:23 GMT
Author: mduerig
Date: Tue Sep 20 14:35:23 2011
New Revision: 1173168

URL: http://svn.apache.org/viewvc?rev=1173168&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP) 
null check   

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/CommitMessage.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/CommitMessage.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/CommitMessage.java?rev=1173168&r1=1173167&r2=1173168&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/CommitMessage.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/CommitMessage.java
Tue Sep 20 14:35:23 2011
@@ -27,13 +27,9 @@ public class CommitMessage {
             k = s.indexOf(SEPARATOR_CHAR, k + 1);
         }
 
-        if (k == -1) {
-            IllegalArgumentException e = new IllegalArgumentException(s);
-            log.error(e.getMessage(), e);
-            throw e;
-        }
-
-        return new CommitMessage(unescape(s.substring(0, k)), unescape(s.substring(k + 1,
s.length())));
+        return k == -1
+            ? null
+            : new CommitMessage(unescape(s.substring(0, k)), unescape(s.substring(k + 1,
s.length())));
     }
 
     public CommitMessage(String userId, String userData) {



Mime
View raw message