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 2021/02/22 18:46:03 UTC
[GitHub] [jena] kinow commented on a change in pull request #931: JENA-2031: More tests for IRIx
kinow commented on a change in pull request #931:
URL: https://github.com/apache/jena/pull/931#discussion_r580497032
##########
File path: jena-core/src/main/java/org/apache/jena/irix/IRIProviderJenaIRI.java
##########
@@ -161,33 +189,21 @@ private static IRI exceptions(IRI iri) {
Violation v = vIter.next();
int code = v.getViolationCode() ;
// Filter codes.
- if ( code == Violation.PERCENT_ENCODING_SHOULD_BE_UPPERCASE)
- continue;
-
- if ( code == Violation.SCHEME_PATTERN_MATCH_FAILED && isURN(iri) && ! STRICT_URN )
- continue;
-
- if ( code == Violation.REQUIRED_COMPONENT_MISSING && isFILE(iri) )
- // jena-iri implements the earlier RFCs, not RFC8089 which adds "file:local"
- continue;
- //break to retain errors
+ // Global settings below; this section is for conditional filtering.
switch(code) {
- //case Violation.LOWERCASE_PREFERRED:
- case Violation.PERCENT_ENCODING_SHOULD_BE_UPPERCASE:
- continue;
-
case Violation.SCHEME_PATTERN_MATCH_FAILED:
if ( isURN(iri) && ! STRICT_URN )
continue;
if ( isFILE(iri) )
continue;
break;
case Violation.REQUIRED_COMPONENT_MISSING:
- if ( isFILE(iri) && ! STRICT_FILE )
+ // jena-iri handling of file: URIs is only for (an interpreation of) RFC 1738.
Review comment:
s/interpreation/interpretation
##########
File path: jena-core/src/main/java/org/apache/jena/irix/IRIProviderJenaIRI.java
##########
@@ -161,33 +189,21 @@ private static IRI exceptions(IRI iri) {
Violation v = vIter.next();
int code = v.getViolationCode() ;
// Filter codes.
- if ( code == Violation.PERCENT_ENCODING_SHOULD_BE_UPPERCASE)
- continue;
-
- if ( code == Violation.SCHEME_PATTERN_MATCH_FAILED && isURN(iri) && ! STRICT_URN )
- continue;
-
- if ( code == Violation.REQUIRED_COMPONENT_MISSING && isFILE(iri) )
- // jena-iri implements the earlier RFCs, not RFC8089 which adds "file:local"
- continue;
- //break to retain errors
+ // Global settings below; this section is for conditional filtering.
switch(code) {
- //case Violation.LOWERCASE_PREFERRED:
- case Violation.PERCENT_ENCODING_SHOULD_BE_UPPERCASE:
- continue;
-
case Violation.SCHEME_PATTERN_MATCH_FAILED:
if ( isURN(iri) && ! STRICT_URN )
continue;
if ( isFILE(iri) )
continue;
break;
case Violation.REQUIRED_COMPONENT_MISSING:
- if ( isFILE(iri) && ! STRICT_FILE )
+ // jena-iri handling of file: URIs is only for (an interpreation of) RFC 1738.
+ // RFC8089 allows relative fil eURIs and a wider use of characters.
Review comment:
s/fil eURIs/file URIs
----------------------------------------------------------------
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