aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Jonathan Bluett-Duncan <jbluettduncan@gmail.com>2017-06-21 16:37:42 +0200
committerGravatar Philipp Wollermann <philwo@google.com>2017-06-22 11:51:07 +0200
commit52c041762ce703a8bdb9b07e1d558b0d2460d2cc (patch)
tree729fda018553427d6d60f1c892d38d7d0eb7e414 /src/main
parent9d9ac15b69530edd83c1b95f98a70efa8f98a27a (diff)
Allow "[", "]", "{", and "}" in globs in BUILD files. (#3048)
PR #2679 allowed parentheses ("(" and ")") in globs, but other bracket style characters were not allowed at the time. It was decided in issues #2583 and #3048 that other bracket characters should be allowed as well, since there is no apparent historical reason for disallowing them in the first place. Closes #3166. PiperOrigin-RevId: 159691498
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java b/src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java
index 261072db75..771b11a925 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/UnixGlob.java
@@ -131,14 +131,6 @@ public final class UnixGlob {
if (pattern.charAt(0) == '/') {
return "pattern cannot be absolute";
}
- for (int i = 0; i < pattern.length(); i++) {
- char c = pattern.charAt(i);
- switch (c) {
- case '{': case '}':
- case '[': case ']':
- return "illegal character '" + c + "'";
- }
- }
Iterable<String> segments = Splitter.on('/').split(pattern);
for (String segment : segments) {
if (segment.isEmpty()) {