commit | 9eed0b1a346e527c1d7b60e96eccf04433898c33 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@ak.jp.nec.com> | Wed Jun 07 11:59:18 2017 -0700 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Mon Jun 12 21:19:29 2017 +0000 |
tree | 85c70f51381941a700e6b27660f1baa74e89ed39 | |
parent | 6ee6b8ccd240f937b3146aeb47b22cdf6f1a1933 [diff] [blame] |
Revisit Annotations merging - avoid extra instantiation/copying when possible Change-Id: Ia2f74a1fe2ff1176346316565c9bc6786cd7f6e4
diff --git a/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java b/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java index dd56217..87f908a 100644 --- a/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java +++ b/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java
@@ -80,10 +80,10 @@ */ public static SparseAnnotations combine(BasicHostConfig cfg, SparseAnnotations an) { DefaultAnnotations.Builder builder = DefaultAnnotations.builder(); - + builder.putAll(an); combineElementAnnotations(cfg, builder); - return DefaultAnnotations.union(an, builder.build()); + return builder.build(); } /**