diff options
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/LocationExpander.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/LocationExpander.java b/src/main/java/com/google/devtools/build/lib/analysis/LocationExpander.java index 882b93bae5..225b3e14b6 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/LocationExpander.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/LocationExpander.java @@ -48,7 +48,7 @@ import java.util.TreeSet; * Note that //mypackage:myhelper should have just one output. */ public class LocationExpander { - + /** * List of options to tweak the LocationExpander. */ @@ -58,7 +58,7 @@ public class LocationExpander { /** Allow to take label from the data attribute */ ALLOW_DATA, } - + private static final int MAX_PATHS_SHOWN = 5; private static final String LOCATION = "$(location"; private final RuleContext ruleContext; @@ -105,7 +105,7 @@ public class LocationExpander { /** * Creates location expander helper bound to specific target. - * + * * @param ruleContext the BUILD rule's context * @param options the list of options, see {@link Options}. */ @@ -181,7 +181,7 @@ public class LocationExpander { message = String.format(" in %s expression", message); // (2) parse label - String labelText = value.substring(start + scannedLength, end); + String labelText = value.substring(start + scannedLength, end).trim(); Label label = parseLabel(labelText, message, reporter); if (label == null) { @@ -206,7 +206,7 @@ public class LocationExpander { restart = end + 1; } - + return result.toString(); } @@ -357,7 +357,7 @@ public class LocationExpander { } return values; } - + private static interface ErrorReporter { void report(RuleContext ctx, String error); } |