Vitor de Lima has posted comments on this change. Change subject: core: Replace ANTLRv4 with JavaCC in OsInfo validation ......................................................................
Patch Set 2: (2 comments) 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 Done 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.begin Done 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: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Sandro Bonazzola <[email protected]> Gerrit-Reviewer: Vitor de Lima <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
