changeset 11005:2a68af61c4cb

8133232: [fs] Regex has redundant | in the char class Reviewed-by: bpb, rriggs
author igerasim
date Mon, 17 Aug 2015 00:14:42 +0300
parents c5d02f908fb2
children dd9cdfce2bed
files src/solaris/classes/sun/nio/fs/MimeTypesFileTypeDetector.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Thu Aug 13 16:25:08 2015 +0300
+++ b/src/solaris/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Mon Aug 17 00:14:42 2015 +0300
@@ -171,7 +171,7 @@
 
                 final String EXTEQUAL = "exts=";
                 String extRegex = "\\b" + EXTEQUAL +
-                        "(\"[\\p{Graph}|\\p{Blank}]+?\"|\\p{Graph}+\\b)";
+                        "(\"[\\p{Graph}\\p{Blank}]+?\"|\\p{Graph}+\\b)";
                 Pattern extPattern = Pattern.compile(extRegex);
                 Matcher extMatcher = extPattern.matcher(entry);
 
@@ -181,7 +181,7 @@
                     if (exts.charAt(0) == '"') {
                         exts = exts.substring(1, exts.length() - 1);
                     }
-                    String[] extList = exts.split("[\\p{Blank}|\\p{Punct}]+");
+                    String[] extList = exts.split("[\\p{Blank}\\p{Punct}]+");
                     for (String ext : extList) {
                         putIfAbsent(ext, type);
                     }