equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
288 throw new IllegalArgumentException(); |
288 throw new IllegalArgumentException(); |
289 String syntax = syntaxAndInput.substring(0, pos); |
289 String syntax = syntaxAndInput.substring(0, pos); |
290 String input = syntaxAndInput.substring(pos+1); |
290 String input = syntaxAndInput.substring(pos+1); |
291 |
291 |
292 String expr; |
292 String expr; |
293 if (syntax.equals(GLOB_SYNTAX)) { |
293 if (syntax.equalsIgnoreCase(GLOB_SYNTAX)) { |
294 expr = Globs.toUnixRegexPattern(input); |
294 expr = Globs.toUnixRegexPattern(input); |
295 } else { |
295 } else { |
296 if (syntax.equals(REGEX_SYNTAX)) { |
296 if (syntax.equalsIgnoreCase(REGEX_SYNTAX)) { |
297 expr = input; |
297 expr = input; |
298 } else { |
298 } else { |
299 throw new UnsupportedOperationException("Syntax '" + syntax + |
299 throw new UnsupportedOperationException("Syntax '" + syntax + |
300 "' not recognized"); |
300 "' not recognized"); |
301 } |
301 } |