namedgraph opened a new issue, #3102:
URL: https://github.com/apache/jena/issues/3102

   ### Version
   
   4.7.0
   
   ### What happened?
   
   I'm trying to implement a server that would reject relative URIs and it 
seems to be unexpectedly difficult. First I thought it's about #3101 but now it 
looks to me like an N-Triples parser bug. N-Triples do not allow relative URIs, 
but this test passes for me:
   ```java
   String invalidNTriples = """
       <relative/subject> <http://example.com/predicate> 
<http://example.com/object> .
   """;
   
   Model model = ModelFactory.createDefaultModel();
   
   try {
       RDFParser.create()
           .source(new StringReader(invalidNTriples))
           .lang(Lang.NTRIPLES)
           .checking(true)
           .parse(model);
   
       System.out.println("Parsed successfully — ERROR: this should not 
happen!");
   } catch (RiotException ex) {
       System.out.println("Caught expected parsing error: " + ex.getMessage());
   }
   ```
   The `checking(true)` setting does not make any difference either.
   
   ### Relevant output and stacktrace
   
   ```shell
   Parsed successfully — ERROR: this should not happen!
   ```
   
   ### Are you interested in making a pull request?
   
   None


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to