Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2001

Regex patterns not validated correctly with newer versions of Java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.3.0
    • None
    • Front End
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            slawrence Steve Lawrence
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: