Some cleanup changes.
--
MOS_MIGRATED_REVID=87821306
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
index a84bb94..5bf199d 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
@@ -420,13 +420,8 @@
try {
ConfiguredTarget ct = getConfiguredTarget(label, ctg.getConfiguration());
keys.add(Preconditions.checkNotNull(ct.getProvider(ConfigMatchingProvider.class)));
- } catch (NoSuchPackageException e) {
- // All lookups should succeed because we should not be looking up any targets in error.
- throw new IllegalStateException(e);
- } catch (NoSuchTargetException e) {
- // All lookups should succeed because we should not be looking up any targets in error.
- throw new IllegalStateException(e);
- } catch (NoSuchConfiguredTargetException e) {
+ } catch (
+ NoSuchPackageException | NoSuchTargetException | NoSuchConfiguredTargetException e) {
// All lookups should succeed because we should not be looking up any targets in error.
throw new IllegalStateException(e);
}
@@ -781,7 +776,7 @@
for (ExtraArtifactSet set : builder.build()) {
boolean filterMatches = filter == null || filter.isIncluded(set.getLabel().toString());
if (filterMatches) {
- Iterables.addAll(artifactsToBuild, set.getArtifacts());
+ artifactsToBuild.addAll(set.getArtifacts());
}
}
}