Remove duplicates in the file puller's pull patterns.
Bug: 147498049
Test: manual
Change-Id: I5a582987131f37ad34abd624002a9b58a5c29a55
diff --git a/src/com/android/tradefed/device/metric/FilePullerDeviceMetricCollector.java b/src/com/android/tradefed/device/metric/FilePullerDeviceMetricCollector.java
index 5fe4e1e..3bbf52e 100644
--- a/src/com/android/tradefed/device/metric/FilePullerDeviceMetricCollector.java
+++ b/src/com/android/tradefed/device/metric/FilePullerDeviceMetricCollector.java
@@ -27,11 +27,11 @@
import java.io.File;
import java.io.IOException;
import java.util.AbstractMap.SimpleEntry;
-import java.util.ArrayList;
import java.util.Arrays;
-import java.util.List;
+import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Set;
import java.util.regex.Pattern;
/**
@@ -41,16 +41,15 @@
public abstract class FilePullerDeviceMetricCollector extends BaseDeviceMetricCollector {
@Option(
- name = "pull-pattern-keys",
- description = "The pattern key name to be pull from the device as a file. Can be repeated."
- )
- private List<String> mKeys = new ArrayList<>();
+ name = "pull-pattern-keys",
+ description =
+ "The pattern key name to be pull from the device as a file. Can be repeated.")
+ private Set<String> mKeys = new HashSet<>();
@Option(
- name = "directory-keys",
- description = "Path to the directory on the device that contains the metrics."
- )
- protected List<String> mDirectoryKeys = new ArrayList<>();
+ name = "directory-keys",
+ description = "Path to the directory on the device that contains the metrics.")
+ protected Set<String> mDirectoryKeys = new HashSet<>();
@Option(
name = "clean-up",