This is an automated email from the ASF dual-hosted git repository. andy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/jena.git
commit ed1a45bb1017bc9c5abd7c7d65b42234b473d69f Author: Andy Seaborne <[email protected]> AuthorDate: Tue Jul 29 22:11:31 2025 +0100 Tidy up IRI3986 --- .../main/java/org/apache/jena/rfc3986/IRI3986.java | 23 ++++------------------ 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/jena-iri3986/src/main/java/org/apache/jena/rfc3986/IRI3986.java b/jena-iri3986/src/main/java/org/apache/jena/rfc3986/IRI3986.java index 2657c72ee4..dd810a80cc 100644 --- a/jena-iri3986/src/main/java/org/apache/jena/rfc3986/IRI3986.java +++ b/jena-iri3986/src/main/java/org/apache/jena/rfc3986/IRI3986.java @@ -408,10 +408,12 @@ public class IRI3986 implements IRI { @Override public String path() { + // Assigning to a object member is atomic and even if two part/assignment + // overlap, they are the same value-equals string. if ( hasPath() && path == null ) path = part(iriStr, path0, path1); if ( path == null ) - return ""; + path = ""; return path; } @@ -511,8 +513,6 @@ public class IRI3986 implements IRI { /** * Don't make the parts during parsing but wait until needed, if at all. - * Assigning to a object member is atomic and even if two part/assignment - * overlap, they are the same value-equals string. */ private static String part(String str, int start, int finish) { if ( start >= 0 ) { @@ -743,7 +743,7 @@ public class IRI3986 implements IRI { // if ( strictResolver && ! this.hasScheme() ) // return other; // Be lax - don't require base to have scheme. - // Rel path resolves against rel path. + // Relative path resolves against relative path. /* 5.2.2. Transform References */ IRI3986 iri = AlgResolveIRI.resolve(this, other); if ( iri != other ) @@ -1511,21 +1511,6 @@ public class IRI3986 implements IRI { schemeReport(this, Issue.iri_host_not_lowercase, URIScheme.GENERAL, "Host name should be lowercase"); } - // Done HTTP/HTTPS -// if ( hasHost() ) { -// String host = host(); -// if ( containsUppercase(host) ) { -// schemeReport(this, Issue.iri_host_not_lowercase, URIScheme.GENERAL, "Host name includes uppercase characters: '"+host+"'"); -// } -// } - - // Done HTTP/HTTPS -// if ( hasUserInfo() ) { -// schemeReport(this, Issue.iri_user_info_present, URIScheme.GENERAL, "userinfo (e.g. user:password) in authority section"); -// if ( userInfo().contains(":") ) -// schemeReport(this, Issue.iri_user_password, scheme, "userinfo contains password in authority section"); -// } - // RFC 3986 section 2.1 /* If two URIs differ only in the case of hexadecimal digits used in * percent-encoded octets, they are equivalent. For consistency, URI
