diff options
author | tomlu <tomlu@google.com> | 2018-02-01 07:21:27 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-01 07:23:16 -0800 |
commit | a904b85376251775d58852a0e8480c0db032bac8 (patch) | |
tree | 83e846c6cfebee7259f093661e9313d4fc9338f8 /src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetFingerprintCache.java | |
parent | 5a50a7c403e567b850d5037d1ee0dad96be0b39d (diff) |
Allow CustomCommandLine's mapFn to expand each object into multiple items.
This is needed to migrate JavaCompileAction away from CustomMultiArgv.
PiperOrigin-RevId: 184136486
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetFingerprintCache.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetFingerprintCache.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetFingerprintCache.java b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetFingerprintCache.java index 083ef06269..cd23964909 100644 --- a/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetFingerprintCache.java +++ b/src/main/java/com/google/devtools/build/lib/collect/nestedset/NestedSetFingerprintCache.java @@ -60,7 +60,7 @@ public class NestedSetFingerprintCache { private <T> void addNestedSetToFingerprintSlow( MapFn<? super T> mapFn, Fingerprint fingerprint, NestedSet<T> nestedSet) { for (T object : nestedSet) { - fingerprint.addString(mapFn.expandToCommandLine(object)); + mapFn.expandToCommandLine(object, fingerprint); } } @@ -92,7 +92,7 @@ public class NestedSetFingerprintCache { @VisibleForTesting <T> void addToFingerprint( CommandLineItem.MapFn<? super T> mapFn, Fingerprint fingerprint, T object) { - fingerprint.addString(mapFn.expandToCommandLine(object)); + mapFn.expandToCommandLine(object, fingerprint); } private static Map<CommandLineItem.MapFn<?>, DigestMap> createMap() { |