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 1017746a7679daf75b1199b7ef6073e397d73950 Author: Andy Seaborne <[email protected]> AuthorDate: Sun Jan 28 14:39:11 2024 +0000 Javadoc tweaks for QuotedURI --- .../main/java/org/apache/jena/riot/out/quoted/QuotedURI.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/jena-arq/src/main/java/org/apache/jena/riot/out/quoted/QuotedURI.java b/jena-arq/src/main/java/org/apache/jena/riot/out/quoted/QuotedURI.java index 89eef18626..5f1d417b42 100644 --- a/jena-arq/src/main/java/org/apache/jena/riot/out/quoted/QuotedURI.java +++ b/jena-arq/src/main/java/org/apache/jena/riot/out/quoted/QuotedURI.java @@ -31,12 +31,14 @@ import org.apache.jena.riot.SysRIOT; /** * Writing URI strings for Turtle etc. * <p>If the URI string contains bad characters (control characters - * x00 to x20 and characters <>"{}|^`\) various ways to handle this are provided. + * x00 to x20 and characters {@literal <>}"{}|^`\) various ways to handle this are provided. * They cause either a different URI to written or an illegal one. * <p> - * There is no way to - * write illegal characters. Percent-encoding is an encoding, not an escape - * mechanism. It put actual 3 characters %-X-X.into the URI. + * There is no way to write these illegal characters. + * Percent-encoding is an encoding, not an escape mechanism. + * It put actual 3 characters %-X-X.into the URI. + * Even if the character is put in with a Unicode \-u escape, it is not a legal URI + * and will fail URI parsing. */ public class QuotedURI { @@ -46,9 +48,11 @@ public class QuotedURI { this(CharSpace.UTF8) ; } + /** Write a replacement for a bad character. */ @FunctionalInterface private interface BadCharWriter { void writeChar(AWriter out, char ch); } + /** Signal a bad character. */ @FunctionalInterface private interface BadCharHandler { void badChar(int idx, String str, char ch); }
