summaryrefslogtreecommitdiffstats
path: root/processing
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-06-30 22:13:14 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-06-30 22:13:14 +0000
commit2ef3ab5fa7017e5fea5cdec223bcf98a9edf7550 (patch)
tree45bf1600236c9e14d12d3c1c3f18121c1153d927 /processing
parentaac7958354aab414dc036a82dcf493a749d6f1d5 (diff)
Add support for serializing and compressing once, instead of once per backend node.
Diffstat (limited to 'processing')
-rw-r--r--processing/src/main/java/com/yahoo/processing/request/CompoundName.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/processing/src/main/java/com/yahoo/processing/request/CompoundName.java b/processing/src/main/java/com/yahoo/processing/request/CompoundName.java
index 976fb3e2796..09c0879fdbf 100644
--- a/processing/src/main/java/com/yahoo/processing/request/CompoundName.java
+++ b/processing/src/main/java/com/yahoo/processing/request/CompoundName.java
@@ -5,7 +5,6 @@ import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
import static com.yahoo.text.Lowercase.toLowerCase;
@@ -141,9 +140,8 @@ public final class CompoundName {
if (nameParts.length == 0) return this;
if (isEmpty()) return fromComponents(nameParts);
- List<String> newCompounds = new ArrayList<>();
- for (String namePart : nameParts)
- newCompounds.add(namePart);
+ List<String> newCompounds = new ArrayList<>(nameParts.length+compounds.size());
+ newCompounds.addAll(Arrays.asList(nameParts));
newCompounds.addAll(this.compounds);
return new CompoundName(newCompounds);
}