src/java.base/windows/classes/sun/nio/fs/WindowsFileSystem.java

Print this page
rev 11514 : 8073445: (fs) FileSystem.getPathMatcher(...) should check syntax component without regard to case
Summary: Change String equals() to equalsIgnoreCase() where needed.
Reviewed-by: TBD

*** 1,7 **** /* ! * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 288,301 **** throw new IllegalArgumentException(); String syntax = syntaxAndInput.substring(0, pos); String input = syntaxAndInput.substring(pos+1); String expr; ! if (syntax.equals(GLOB_SYNTAX)) { expr = Globs.toWindowsRegexPattern(input); } else { ! if (syntax.equals(REGEX_SYNTAX)) { expr = input; } else { throw new UnsupportedOperationException("Syntax '" + syntax + "' not recognized"); } --- 288,301 ---- throw new IllegalArgumentException(); String syntax = syntaxAndInput.substring(0, pos); String input = syntaxAndInput.substring(pos+1); String expr; ! if (syntax.equalsIgnoreCase(GLOB_SYNTAX)) { expr = Globs.toWindowsRegexPattern(input); } else { ! if (syntax.equalsIgnoreCase(REGEX_SYNTAX)) { expr = input; } else { throw new UnsupportedOperationException("Syntax '" + syntax + "' not recognized"); }