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

[fs] Regex has redundant | in the char class

XMLWordPrintable

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

        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.

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

                Created:
                Updated:
                Resolved: