You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2020/10/09 19:23:37 UTC

[GitHub] [jena] kinow commented on a change in pull request #809: JENA-1978: Parse rules header

kinow commented on a change in pull request #809:
URL: https://github.com/apache/jena/pull/809#discussion_r502629352



##########
File path: jena-core/src/main/java/org/apache/jena/reasoner/rulesys/Rule.java
##########
@@ -675,7 +673,9 @@ private static int nextSplit(int start, boolean white, String line) {
      * @throws ParserException if there is a problem
      */
     public static List<Rule> parseRules(String source,BuiltinRegistry registry) throws ParserException {
-        return parseRules(new Parser(source,registry));
+        BufferedReader reader = new BufferedReader(new StringReader(source));
+        Parser parser = rulesParserFromReader(reader, registry);
+        return parseRules(parser);

Review comment:
       Could we close the reader before returning the created object?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org