AttributeContainer and Rule.getAttributeContainer are now package private.
This mostly addresses the TODO in AttributeContainer.
Functionally this CL is a no-op.
Consequences: A rule owns all its attributes.
PiperOrigin-RevId: 326127600
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
index 9fd6880..e79f5d2 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
@@ -394,9 +394,7 @@
preparePackageLoading(rootDirectory);
SkyKey skyKey = PackageValue.key(PackageIdentifier.parse("@//foo"));
Package pkg = validPackageWithoutErrors(skyKey);
- assertThat(
- (Iterable<Label>)
- pkg.getTarget("foo").getAssociatedRule().getAttributeContainer().getAttr("srcs"))
+ assertThat((Iterable<Label>) pkg.getTarget("foo").getAssociatedRule().getAttr("srcs"))
.containsExactly(
Label.parseAbsoluteUnchecked("//foo:b.txt"),
Label.parseAbsoluteUnchecked("//foo:c/c.txt"))
@@ -408,9 +406,7 @@
ModifiedFileSet.builder().modify(PathFragment.create("foo/d.txt")).build(),
Root.fromPath(rootDirectory));
pkg = validPackageWithoutErrors(skyKey);
- assertThat(
- (Iterable<Label>)
- pkg.getTarget("foo").getAssociatedRule().getAttributeContainer().getAttr("srcs"))
+ assertThat((Iterable<Label>) pkg.getTarget("foo").getAssociatedRule().getAttr("srcs"))
.containsExactly(
Label.parseAbsoluteUnchecked("//foo:b.txt"),
Label.parseAbsoluteUnchecked("//foo:c/c.txt"),
@@ -534,8 +530,7 @@
@SuppressWarnings("unchecked")
private static Iterable<Label> getSrcs(Package pkg, String targetName)
throws NoSuchTargetException {
- return (Iterable<Label>)
- pkg.getTarget(targetName).getAssociatedRule().getAttributeContainer().getAttr("srcs");
+ return (Iterable<Label>) pkg.getTarget(targetName).getAssociatedRule().getAttr("srcs");
}
@Test