Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
2.3.0
-
None
-
None
Description
According to the DFDL spec, only regex features available in both Java 7 and ICU are allowed, and other features should cause an SDE. To check this, we simply compile a regex with both Java and ICU, and if either fails then we assume the regex is invalid, either because it actually is invalid or it uses a feature that the DFDL spec does not allow.
However, newer versions of Java support newer regex capabilities, so some regex's that are invalid in Java 7 are valid in later Java versions. This means that when using a new version of Java, a regex could be allowed that isn't portable and isn't valid according to the DFDL spec.
So we should manually inspect regular expressions rather for validity than relying on the Java/ICU regex compilers to determine if a regular expression is DFDL compliant and issue an error, or issue a warning that the regex may contain non-portable features, perhaps controlled by a tunable.