Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8133232

[fs] Regex has redundant | in the char class

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 8, 9
    • core-libs
    • b78

    Backports

      Description

        In jdk/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java there are two regexps:

        String extRegex = "\\b" + EXTEQUAL +
            "(\"[\\p{Graph}|\\p{Blank}]+?\"|\\p{Graph}+\\b)";

        String[] extList = exts.split("[\\p{Blank}|\\p{Punct}]+");

        which have redundant bar-character in the char class.

        Attachments

          Issue Links

            Activity

              People

                igerasim Ivan Gerasimov
                igerasim Ivan Gerasimov
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: