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 15:28:01 UTC

[GitHub] [jena] afs opened a new pull request #809: JENA-1978: Parse rules header

afs opened a new pull request #809:
URL: https://github.com/apache/jena/pull/809


   Includes JENA-1976 (dft CORS to on)


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


[GitHub] [jena] afs merged pull request #809: JENA-1977: Parse rules header

Posted by GitBox <gi...@apache.org>.
afs merged pull request #809:
URL: https://github.com/apache/jena/pull/809


   


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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #809:
URL: https://github.com/apache/jena/pull/809#discussion_r502769556



##########
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:
       Done.




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