diff options
author | Janak Ramakrishnan <janakr@google.com> | 2016-08-15 21:54:55 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2016-08-16 15:21:17 +0000 |
commit | 3c0adb26bac6d756fb97e4bcc6d4e5b2cefa5eeb (patch) | |
tree | c77f6438711f4b23d6c528907a81e23dc9e6dc91 /src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java | |
parent | 89125d5ee83f562c309a792a7c56ce24452e61ea (diff) |
Allow Skyframe graph lookups and value retrievals to throw InterruptedException.
The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer.
--
MOS_MIGRATED_REVID=130327770
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java b/src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java index 8a90c10ff5..85dc32044d 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java +++ b/src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java @@ -18,10 +18,8 @@ import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.syntax.Type; - import java.util.HashMap; import java.util.Map; - import javax.annotation.Nullable; /** @@ -185,7 +183,7 @@ public final class TargetUtils { return index != -1 ? ruleClass.substring(0, index) : ruleClass; } - private static boolean isExplicitDependency(Rule rule, Label label) { + private static boolean isExplicitDependency(Rule rule, Label label) throws InterruptedException { if (rule.getVisibility().getDependencyLabels().contains(label)) { return true; } @@ -227,11 +225,11 @@ public final class TargetUtils { } /** - * Return nicely formatted error message that {@link Label} label that was pointed to by - * {@link Target} target did not exist, due to {@link NoSuchThingException} e. + * Return nicely formatted error message that {@link Label} label that was pointed to by {@link + * Target} target did not exist, due to {@link NoSuchThingException} e. */ - public static String formatMissingEdge(@Nullable Target target, Label label, - NoSuchThingException e) { + public static String formatMissingEdge( + @Nullable Target target, Label label, NoSuchThingException e) throws InterruptedException { // instanceof returns false if target is null (which is exploited here) if (target instanceof Rule) { Rule rule = (Rule) target; |