Repository navigation
Tighten the fallback regex for uri, uri-reference, iri and iri-reference - #1391
Conversation
A scheme must start with a letter, and the comma is no longer allowed. // is valid only for uri-reference and iri-reference.
Review of #1391Reviewed at head Existing bugs this PR leaves in place1. The fallback matches JDK 25 builds the
The new Suggested fix: match the original value, for example by passing it from 2. All four formats reject 3. A custom absolute format still accepts The fallback never calls One option: in the base Minor
|
Pass the value as it is to handleException, since JDK 25 can trim or empty the exception input. Check a fallback value with validate(URI), using / for its empty path, so the // rule lives in the base class and custom formats get it. Accept scheme ":" "#" fragment.
java.net.URI accepts them in the fragment and in an opaque part, such as urn:a[b. Check them once in AbstractRFC3986Format, instead of the query only in each format.
|
Thanks Steve. All six are addressed in 1f0516d, plus one gap I found in 50768df.
Extra, 50768df:
|
Re-review of #1391Reviewed at head Nothing here blocks the merge. One existing bug and two small items remain. Existing bug1. RFC 3987 allows
The base commit already accepted the path cases. A check next to Minor
|
|
Thanks Steve. Points 2 and 3 are fixed in de6258f: Point 1 goes in the AbstractRFC3987Format follow-up, which already rejects non- |
Re-review of #1391Thanks. I read
I found nothing new in it. Moving the private-use and noncharacter check to the Once the PR head moves to |
containsMisplacedBracket is protected, so a subclass can accept ?tags[]=a. Replace the duplicate :// row with the iri case.
de6258f to
f7a085c
Compare
|
Re-reviewed at head |
Follow-up to #1390 (item 8). The fallback regex now requires a scheme that starts with a letter, and drops the comma range. // is invalid for uri/iri and stays valid for uri-reference/iri-reference.
After review: the fallback checks the original value (JDK 25), runs validate(URI) so custom formats get the // rule, accepts scheme:#fragment, and [ ] are rejected outside an IP-literal.