aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java_tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/java_tools')
-rw-r--r--src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java4
-rw-r--r--src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java6
2 files changed, 3 insertions, 7 deletions
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java
index feebbe2691..e50b5ceed5 100644
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java
@@ -252,7 +252,9 @@ public final class OptionsParser {
* @throws java.io.IOException if one of the files containing options cannot be read.
*/
private static void expandArgument(Deque<String> expanded, String arg) throws IOException {
- if (arg.startsWith("@") && !arg.startsWith("@@")) {
+ if (arg.startsWith("@@")) {
+ expanded.add(arg.substring(1));
+ } else if (arg.startsWith("@")) {
for (String line : Files.readAllLines(Paths.get(arg.substring(1)), UTF_8)) {
if (line.length() > 0) {
expandArgument(expanded, line);
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java
index 5f569354a8..9d4f5e0a21 100644
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java
@@ -395,12 +395,6 @@ public final class StrictJavaDepsPlugin extends BlazeJavaCompilerPlugin {
/** Returns the canonical version of the target name. Package private for testing. */
static String canonicalizeTarget(String target) {
- int atIndex = target.indexOf('@');
- if (atIndex != -1) {
- // target starts with @@repo ('@' is escaped for the params file parsing) so one @ needs to
- // be stripped.
- target = target.substring(1);
- }
int colonIndex = target.indexOf(':');
if (colonIndex == -1) {
// No ':' in target, nothing to do.