aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Michajlo Matijkiw <michajlo@google.com>2015-04-15 17:28:35 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-04-16 18:35:35 +0000
commit0e30a5f51dde7dfa9bc38fe899b5d10fc567c63e (patch)
treeeb4151894d33135ab730c48e2f720a1ee320eb29 /src/main/java/com
parentff6458cdeb9a333816f8d759d329606e7ff1f157 (diff)
VisibleForTesting cleanup in Runfiles
Many of the @VisibleForTesting annotations didn't actually apply. Remove them, apply the annotation to places where it applies, and change visibility of mttehods to be more restrictive. -- MOS_MIGRATED_REVID=91208297
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java b/src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java
index f13e35757c..e7c07277e3 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java
@@ -232,7 +232,6 @@ public final class Runfiles {
* Returns the artifacts that are unconditionally included in the runfiles (as opposed to
* pruning manifest candidates, which may or may not be included).
*/
- @VisibleForTesting
public NestedSet<Artifact> getUnconditionalArtifacts() {
return unconditionalArtifacts;
}
@@ -248,9 +247,8 @@ public final class Runfiles {
/**
* Returns the collection of runfiles as artifacts, including both unconditional artifacts
- * and pruning manifest candidates.
+ * and pruning manifest candidates, but not including any artifacts produced by expansion.
*/
- @VisibleForTesting
public NestedSet<Artifact> getArtifacts() {
NestedSetBuilder<Artifact> allArtifacts = NestedSetBuilder.stableOrder();
allArtifacts.addAll(unconditionalArtifacts.toCollection());
@@ -289,7 +287,8 @@ public final class Runfiles {
* @param workingManifest Manifest to be checked for obscuring symlinks.
* @return map of source file names mapped to their location on disk.
*/
- public static Map<PathFragment, Artifact> filterListForObscuringSymlinks(
+ @VisibleForTesting
+ static Map<PathFragment, Artifact> filterListForObscuringSymlinks(
EventHandler eventHandler, Location location, Map<PathFragment, Artifact> workingManifest) {
Map<PathFragment, Artifact> newManifest = new HashMap<>();
@@ -362,6 +361,7 @@ public final class Runfiles {
manifest = filterListForObscuringSymlinks(eventHandler, location, manifest);
manifest.putAll(manifestExpander.apply(manifest));
+
PathFragment path = new PathFragment(suffix);
Map<PathFragment, Artifact> result = new HashMap<>();
for (Map.Entry<PathFragment, Artifact> entry : manifest.entrySet()) {
@@ -409,7 +409,7 @@ public final class Runfiles {
/**
* Returns the symlinks expander specified for this runfiles tree.
*/
- public Function<Map<PathFragment, Artifact>, Map<PathFragment, Artifact>> getSymlinkExpander() {
+ private Function<Map<PathFragment, Artifact>, Map<PathFragment, Artifact>> getSymlinkExpander() {
return manifestExpander;
}