Repository: apache/jena (java)

Issue:
Don't warn about non-NFC IRIs
### Version

5.2.0

### Feature

See discussion https://lists.apache.org/thread/bry7zdrw2lvgkh9m7r3mzbfhcp46t8sb (2024-12-08)

Checking NFC isn't helpful. 

It is nowadays only [a suggestion to avoid non-NFC URIs in RDF Concepts](https://www.w3.org/TR/rdf11-concepts/#section-IRIs).


### Are you interested in contributing a solution yourself?

Yes

Pull request description:
GH-2887: Tolerate non-NFC IRIs (IRIProviderJenaIRI)
GitHub issue resolved #2887

----

 - [x] Tests are included.
 - [x] Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the [Contributor's Agreement](https://www.apache.org/licenses/contributor-agreements.html).

----

See the [Apache Jena "Contributing" guide](https://github.com/apache/jena/blob/main/CONTRIBUTING.md).


Patch:
diff --git a/.asf.yaml b/.asf.yaml
index 075be402ba..8b4f4bb4e6 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -9,7 +9,7 @@ notifications:
     jira_options:  link label
 
 github:
-  description: "Apache Jena"
+  description: "Apache Jena, A free and open source Java framework for building Semantic Web and Linked Data applications."
   homepage: https://jena.apache.org/
   protected_branches:
     main
@@ -20,4 +20,8 @@ github:
     - jena
     - rdf
     - sparql
+  enabled_merge_buttons:
+    squash: false
+    rebase: true
+    merge: false
 
diff --git a/jena-core/src/main/java/org/apache/jena/irix/IRIProviderJenaIRI.java b/jena-core/src/main/java/org/apache/jena/irix/IRIProviderJenaIRI.java
index 222e0e1893..e6c60ceb35 100644
--- a/jena-core/src/main/java/org/apache/jena/irix/IRIProviderJenaIRI.java
+++ b/jena-core/src/main/java/org/apache/jena/irix/IRIProviderJenaIRI.java
@@ -249,23 +249,24 @@ public class IRIProviderJenaIRI implements IRIProvider {
             // Global settings below; this section is for conditional filtering.
             // See also Checker.iriViolations for WARN filtering.
             switch(code) {
-                case Violation.PROHIBITED_COMPONENT_PRESENT:
+                case Violation.PROHIBITED_COMPONENT_PRESENT->{
                     // Allow "u:p@" when non-strict.
                     // Jena3 compatibility.
                     if ( isHTTP(iri) && ! STRICT_HTTP && v.getComponent() == IRIComponents.USER )
                         continue;
-                    break;
-                case Violation.SCHEME_PATTERN_MATCH_FAILED:
+                }
+                case Violation.SCHEME_PATTERN_MATCH_FAILED->{
                     if ( isURN(iri) && ! STRICT_URN )
                         continue;
                     if ( isFILE(iri) )
                         continue;
-                    break;
-                case Violation.REQUIRED_COMPONENT_MISSING:
+                }
+                case Violation.REQUIRED_COMPONENT_MISSING->{
                     // jena-iri handling of "file:" URIs is only for (an interpretation of) RFC 1738.
                     // RFC8089 allows relative file URIs and a wider use of characters.
                     if ( isFILE(iri) )
                         continue;
+                }
             }
             // Signal first error.
             String msg = v.getShortMessage();
diff --git a/jena-core/src/main/java/org/apache/jena/irix/SetupJenaIRI.java b/jena-core/src/main/java/org/apache/jena/irix/SetupJenaIRI.java
index 1639236980..968e48a7ee 100644
--- a/jena-core/src/main/java/org/apache/jena/irix/SetupJenaIRI.java
+++ b/jena-core/src/main/java/org/apache/jena/irix/SetupJenaIRI.java
@@ -99,9 +99,11 @@ public class SetupJenaIRI {
         setErrorWarning(iriCheckerFactory, ViolationCodes.NON_INITIAL_DOT_SEGMENT, false, false);
 
         // == Character related.
-        //setErrorWarning(iriFactoryInst, ViolationCodes.NOT_NFC,  false, false);
+        // Causes confusion! And this is only advice in RDF Concepts.
+        setErrorWarning(iriCheckerFactory, ViolationCodes.NOT_NFC,  false, false);
         // NFKC is not mentioned in RDF 1.1. Switch off.
         setErrorWarning(iriCheckerFactory, ViolationCodes.NOT_NFKC, false, false);
+        // The MAYBE ViolationCodes are never generated.
 
         // ** Applies to various unicode blocks.
 
diff --git a/jena-fuseki2/jena-fuseki-ui/package.json b/jena-fuseki2/jena-fuseki-ui/package.json
index 644b381de3..41690db170 100644
--- a/jena-fuseki2/jena-fuseki-ui/package.json
+++ b/jena-fuseki2/jena-fuseki-ui/package.json
@@ -62,7 +62,7 @@
     "express": "^4.18.2",
     "jsdom": "^25.0.0",
     "json-server": "^0.17.4",
-    "nanoid": "^5.0.5",
+    "nanoid": "^5.0.9",
     "nodemon": "^3.0.1",
     "run-script-os": "^1.1.6",
     "sass": "^1.69.4",
@@ -73,8 +73,6 @@
     "wait-on": "^8.0.0"
   },
   "resolutions": {
-    "send": "^0.19.0",
-    "path-to-regexp": "^0.1.10"
   },
   "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
 }
diff --git a/jena-fuseki2/jena-fuseki-ui/yarn.lock b/jena-fuseki2/jena-fuseki-ui/yarn.lock
index 6bf27ce82e..231002e4f6 100644
--- a/jena-fuseki2/jena-fuseki-ui/yarn.lock
+++ b/jena-fuseki2/jena-fuseki-ui/yarn.lock
@@ -343,9 +343,9 @@
   integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
 
 "@cypress/code-coverage@^3.12.4":
-  version "3.13.8"
-  resolved "https://registry.yarnpkg.com/@cypress/code-coverage/-/code-coverage-3.13.8.tgz#847c4ca3c60b55b3e1b8b8194b827fc675de93f3"
-  integrity sha512-liUtYL42nbEUkMKtB8H2sudI7gREeKNSTO1VbvFRjiRxj+2hurEkxgbVB8fmjm10iQrDeiX6XGEIL2IefcdC0A==
+  version "3.13.9"
+  resolved "https://registry.yarnpkg.com/@cypress/code-coverage/-/code-coverage-3.13.9.tgz#d49f162dcbdba0933d466dd28c3348babe010172"
+  integrity sha512-VnsBLmhRLE3xgeX5hdN7aWCU3l8UHttUCMO7b+2OrRvs+R3kpBwjejfSC0/H7ErXz5o6r99biClIaS5bqo60uQ==
   dependencies:
     "@cypress/webpack-preprocessor" "^6.0.0"
     chalk "4.1.2"
@@ -1582,9 +1582,9 @@ aws4@^1.8.0:
   integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==
 
 axios@^1.6.1, axios@^1.7.7:
-  version "1.7.8"
-  resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.8.tgz#1997b1496b394c21953e68c14aaa51b7b5de3d6e"
-  integrity sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==
+  version "1.7.9"
+  resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a"
+  integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==
   dependencies:
     follow-redirects "^1.15.6"
     form-data "^4.0.0"
@@ -2140,9 +2140,9 @@ cypress-vite@^1.4.2:
     debug "^4.3.4"
 
 cypress@^13.3.2:
-  version "13.16.0"
-  resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.16.0.tgz#7674ca33941f9da58f15fd4e3456856d87730970"
-  integrity sha512-g6XcwqnvzXrqiBQR/5gN+QsyRmKRhls1y5E42fyOvsmU7JuY+wM6uHJWj4ZPttjabzbnRvxcik2WemR8+xT6FA==
+  version "13.16.1"
+  resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.16.1.tgz#82e776f6ad2037ccce6b6feabed768615c476258"
+  integrity sha512-17FtCaz0cx7ssWYKXzGB0Vub8xHwpVPr+iPt2fHhLMDhVAPVrplD+rTQsZUsfb19LVBn5iwkEUFjQ1yVVJXsLA==
   dependencies:
     "@cypress/request" "^3.0.6"
     "@cypress/xvfb" "^1.2.4"
@@ -3033,9 +3033,9 @@ express-urlrewrite@^1.4.0:
     path-to-regexp "^1.0.3"
 
 express@^4.17.1, express@^4.18.2:
-  version "4.21.1"
-  resolved "https://registry.yarnpkg.com/express/-/express-4.21.1.tgz#9dae5dda832f16b4eec941a4e44aa89ec481b281"
-  integrity sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==
+  version "4.21.2"
+  resolved "https://registry.yarnpkg.com/express/-/express-4.21.2.tgz#cf250e48362174ead6cea4a566abef0162c1ec32"
+  integrity sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==
   dependencies:
     accepts "~1.3.8"
     array-flatten "1.1.1"
@@ -3056,7 +3056,7 @@ express@^4.17.1, express@^4.18.2:
     methods "~1.1.2"
     on-finished "2.4.1"
     parseurl "~1.3.3"
-    path-to-regexp "0.1.10"
+    path-to-regexp "0.1.12"
     proxy-addr "~2.0.7"
     qs "6.13.0"
     range-parser "~1.2.1"
@@ -3936,6 +3936,11 @@ is-windows@^1.0.2:
   resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
   integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
 
+isarray@0.0.1:
+  version "0.0.1"
+  resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+  integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==
+
 isarray@^2.0.5:
   version "2.0.5"
   resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723"
@@ -4544,11 +4549,11 @@ n3@^1.3.5:
     readable-stream "^4.0.0"
 
 nanoid@^3.1.23, nanoid@^3.3.7:
-  version "3.3.7"
-  resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
-  integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
+  version "3.3.8"
+  resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf"
+  integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==
 
-nanoid@^5.0.5:
+nanoid@^5.0.9:
   version "5.0.9"
   resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-5.0.9.tgz#977dcbaac055430ce7b1e19cf0130cea91a20e50"
   integrity sha512-Aooyr6MXU6HpvvWXKoVoXwKMs/KyVakWwg7xQfv5/S/RIgJMy0Ifa45H9qqYy7pTCszrHzP21Uk4PZq2HpEM8Q==
@@ -4937,10 +4942,22 @@ path-scurry@^1.11.1:
     lru-cache "^10.2.0"
     minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
 
-path-to-regexp@0.1.10, path-to-regexp@^0.1.10, path-to-regexp@^1.0.3, path-to-regexp@^8.1.0:
-  version "0.1.11"
-  resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.11.tgz#a527e662c89efc4646dbfa8100bf3e847e495761"
-  integrity sha512-c0t+KCuUkO/YDLPG4WWzEwx3J5F/GHXsD1h/SNZfySqAIKe/BaP95x8fWtOfRJokpS5yYHRJjMtYlXD8jxnpbw==
+path-to-regexp@0.1.12:
+  version "0.1.12"
+  resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7"
+  integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==
+
+path-to-regexp@^1.0.3:
+  version "1.9.0"
+  resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.9.0.tgz#5dc0753acbf8521ca2e0f137b4578b917b10cf24"
+  integrity sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==
+  dependencies:
+    isarray "0.0.1"
+
+path-to-regexp@^8.1.0:
+  version "8.2.0"
+  resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-8.2.0.tgz#73990cc29e57a3ff2a0d914095156df5db79e8b4"
+  integrity sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==
 
 path-type@^4.0.0:
   version "4.0.0"
@@ -5404,7 +5421,7 @@ semver@^7.0.0, semver@^7.3.6, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semve
   resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
   integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==
 
-send@0.19.0, send@^0.19.0:
+send@0.19.0:
   version "0.19.0"
   resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8"
   integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==
diff --git a/pom.xml b/pom.xml
index 07238ae4a6..bdb2509cb5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,14 +60,14 @@
 
     <!-- Logging -->
     <ver.slf4j>2.0.16</ver.slf4j>
-    <ver.log4j2>2.24.2</ver.log4j2>
+    <ver.log4j2>2.24.3</ver.log4j2>
 
     <!-- JSON-LD 1.1 -->
     <ver.titanium-json-ld>1.4.1</ver.titanium-json-ld>
     <ver.jakarta.json>2.0.1</ver.jakarta.json>
 
     <!-- These two must be in-step -->
-    <ver.jetty>12.0.15</ver.jetty>
+    <ver.jetty>12.0.16</ver.jetty>
     <ver.jakarta-servlet>6.1.0</ver.jakarta-servlet>
 
     <ver.shiro>2.0.2</ver.shiro>
@@ -93,7 +93,7 @@
     <ver.commons-fileupload>2.0.0-M2</ver.commons-fileupload>
 
     <ver.dexxcollection>0.7</ver.dexxcollection>
-    <ver.micrometer>1.14.1</ver.micrometer>
+    <ver.micrometer>1.14.2</ver.micrometer>
     <ver.roaringbitmap>1.3.0</ver.roaringbitmap>
 
     <!-- Testing -->


Test patch:
diff --git a/jena-core/src/test/java/org/apache/jena/irix/TestIRIxJenaSystem.java b/jena-core/src/test/java/org/apache/jena/irix/TestIRIxJenaSystem.java
index cb3543f3f7..86076feb26 100644
--- a/jena-core/src/test/java/org/apache/jena/irix/TestIRIxJenaSystem.java
+++ b/jena-core/src/test/java/org/apache/jena/irix/TestIRIxJenaSystem.java
@@ -33,8 +33,8 @@ import org.apache.jena.iri.IRI;
 
 /**
  * Test of parsing and schema violations.
- * <p>s
- * This is the test suite that compares result with jena-iri.
+ * <p>
+ * This is the test suite that compares results with jena-iri.
  * See also {@link TestIRIxSyntaxRFC3986} for RDF 3986 syntax only parsing.
  */
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
@@ -90,6 +90,9 @@ public class TestIRIxJenaSystem extends AbstractTestIRIx_3986 {
 
     @Test public void parse_18() { good("/z/a:b"); }
 
+    // This character is from a report on users@jena.
+    @Test public void parse_nfc() { good("http://host/ή"); }
+
     // ---- bad
 
     // Leading ':'