You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by md...@apache.org on 2016/01/26 15:39:13 UTC

svn commit: r1726804 - /jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java

Author: mduerig
Date: Tue Jan 26 14:39:12 2016
New Revision: 1726804

URL: http://svn.apache.org/viewvc?rev=1726804&view=rev
Log:
OAK-3926: oak-run checkpoint should check segment version
Throw runtime exception instead of system.exit to ensure finalisation

Modified:
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java?rev=1726804&r1=1726803&r2=1726804&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java Tue Jan 26 14:39:12 2016
@@ -685,10 +685,9 @@ public final class Main {
             } else if (segmentVersion != null && segmentVersion != LATEST_VERSION) {
                 // The write operations below can only performed with the segment version
                 // matching the tool version
-                System.err.println("Segment version mismatch. " +
+                failWith("Segment version mismatch. " +
                     "Found " + segmentVersion + ", expected " + LATEST_VERSION + ". " +
                     "Please use the respective version of this tool");
-                System.exit(-1);
             } else if ("rm-all".equals(op)) {
                 long time = System.currentTimeMillis();
                 long cnt = cps.removeAll();