[YANGTOOLS-887] JDK regex compatibility Created: 21/Jun/18 Updated: 19/Jun/23 |
|
| Status: | Confirmed |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
JDK9 has changed semantics of java.util.regex.Pattern in ways which are hard to predict and require us to essentially do a full analysis incoming XSD to map it reliably to Pattern – see https://bugs.openjdk.java.net/browse/JDK-8189343 . I do not see any other recourse than to write a home-grown XSD regex parser, compliant with https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#regexs , which will produce an intermediate representation, which will then be translated to java.util.regex.Pattern language. |
| Comments |
| Comment by Robert Varga [ 23/Sep/18 ] |
|
The translation code is incorrect, as && has a different meaning in XSD in in j.u.r.Pattern. We'll disable the UTs and provide a proper solution – but that actually requires the fixes in JDK9 and cannot really work with JDK8 |
| Comment by Robert Varga [ 10/Oct/18 ] |
|
Work-in-progress patch is out there, but I cannot finish it up right now. Putting this on the backlog. |