joerghoh commented on code in PR #640:
URL: https://github.com/apache/jackrabbit-oak/pull/640#discussion_r943686722


##########
oak-benchmarks-elastic/src/main/java/org/apache/jackrabbit/oak/benchmark/ElasticBenchmarkRunner.java:
##########
@@ -25,7 +25,7 @@ public class ElasticBenchmarkRunner extends BenchmarkRunner {
 
     private static ElasticConnection connection;
 
-    public static void main(String[] args) throws Exception {
+    public static int main(String[] args) throws Exception {

Review Comment:
   Regarding the "throw an exception instead of returning a int as exitcode": 
This could be an alternative, but I don't see any improvement over my approach. 
Because if you just throw an exception and let the JVM handle it, the JVM will 
implicitly set the exit code to "1". 
   This would allow a binary state: Success or fail. But looking at the variety 
of calls to ```System.exit()``` in the various commands, I see more exit codes 
than just "0" and "1". I believe we even have "-1". 
   Converting these cases all into throwing exceptions, we would also get 
changes in the behavior. Not to mention that java terminating a program with an 
exception is likely to change the output of the tool.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to