Let jvmtiGen exit with a non-zero exit code upon failure (original) (raw)
Carsten Varming varming at gmail.com
Sun Nov 1 19:48:10 UTC 2015
- Next message: Let jvmtiGen exit with a non-zero exit code upon failure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dear Serguei and Steffan,
Sorry about the late reply. The office was a little busy Friday.
Steffan's suggestion is to remove all the exception handling code sound reasonable. I am not a fan of the main method throwing checked exceptions, so I wrapped all the exception handling into a tiny handler that simply prints the exception and exits with a non-zero value. I never cared much for the stacktrace, so I put printing of the stacktrace under the verbose flag.
Speaking of cleaning up, there is code in there to use Apache xalan instead of the standard xslt processor due to an ancient bug fixed in Java 1.5. I removed that as well.
There was also a comment about the field "document" being package globally accessible due to: "ref'd by the tree-adapter". I have no idea what that means, but changing document to a local variable in main didn't break the build, so I guess that comment is out-of-date. Please let me know if I am missing something here.
There was also a use of java.io.PrintStream. That class suppresses IOExceptions: "Unlike other output streams, a PrintStream never throws an IOException", so I removed the PrintStream as I want to get a failure when something goes wrong.
I have put a new webrev at http://cr.openjdk.java.net/~cvarming/jvmtiGen.02/
Carsten
- Next message: Let jvmtiGen exit with a non-zero exit code upon failure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]