Alon Bar-Lev has posted comments on this change. Change subject: core: Replace ANTLRv4 with JavaCC in OsInfo validation ......................................................................
Patch Set 2: (2 comments) so just for me to confirm... never used this javacc, no runtime dependencies what-so-ever, so no need to pull jars within spec, right? http://gerrit.ovirt.org/#/c/36082/2/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/osinfo/OsinfoPropertiesParser.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/osinfo/OsinfoPropertiesParser.java: Line 13: */ Line 14: public static void parse(String path) { Line 15: Line 16: try { Line 17: FileInputStream inputStream = new FileInputStream(path); please use try-with-resources notation Line 18: Line 19: OsInfoParser parser = new OsInfoParser(inputStream); Line 20: parser.parse(); Line 21: } catch (FileNotFoundException e) { Line 25: int charPositionInLine = e.currentToken.beginColumn; Line 26: String msg = e.getMessage(); Line 27: Line 28: throw new RuntimeException("osinfo properties syntax error: " + Line 29: ("line " + line + ":" + charPositionInLine + " " + msg)); use String.format? drop the temp line variable and use e.currentToken.beginLine same for the other temp variables? throw new RuntimeException( String.format( "osinfo properties syntax error: %s:%s:%s: error: %s", path, e.currentToken.beginLine, e.currentToken.beginColumn, e.getMessage() ), e ) Line 30: } Line 31: } -- To view, visit http://gerrit.ovirt.org/36082 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice68f11f4616ab488d4caf7f8073b4b423ab0c46 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vitor de Lima <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Vitor de Lima <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
