commit | 99e90cd7f5caf72131381116c172ae47fcf6f78f | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Fri Aug 12 15:55:16 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Fri Aug 12 23:04:32 2016 +0000 |
tree | d9d8b61ac23f400695bd64b9dd60b5888acf45f1 | |
parent | 970d6e230c39987f6d635514c3019e5fa1bd9657 [diff] |
Replace anonymous class with lambda expression Change-Id: Icb3c5b6146a4a0a11d0d2300b395689f9286dfb9
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixConsistentSetMultimapState.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixConsistentSetMultimapState.java index 504faff..636e261 100644 --- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixConsistentSetMultimapState.java +++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixConsistentSetMultimapState.java
@@ -602,14 +602,11 @@ @Override public Supplier<HashMultiset<byte[]>> supplier() { - return new Supplier<HashMultiset<byte[]>>() { - @Override - public HashMultiset<byte[]> get() { - if (multiset == null) { - multiset = HashMultiset.create(); - } - return multiset; + return () -> { + if (multiset == null) { + multiset = HashMultiset.create(); } + return multiset; }; } @@ -651,14 +648,11 @@ @Override public Supplier<Set<Map.Entry<String, byte[]>>> supplier() { - return new Supplier<Set<Map.Entry<String, byte[]>>>() { - @Override - public Set<Map.Entry<String, byte[]>> get() { - if (set == null) { - set = Sets.newHashSet(); - } - return set; + return () -> { + if (set == null) { + set = Sets.newHashSet(); } + return set; }; }