Speed up ListsBindingUtils 48/85848/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 18 Nov 2019 12:54:42 +0000 (13:54 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 19 Nov 2019 13:07:01 +0000 (14:07 +0100)
This just uses proper fluent builder pattern instead of a
temporary variable.

Change-Id: I8cdf2cff7c910f5518eb999949f315740fe7c1ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 9e4b1ee522aa173efe114e315b017f77716cdb79)

binding/mdsal-binding-test-model/src/main/java/org/opendaylight/mdsal/binding/test/model/util/ListsBindingUtils.java

index f2e72f76cfa5d3321f7e3f75e04e680a5b16ef33..7ac0e9cccfffafedac15c8f2d0f550c08a05e264 100644 (file)
@@ -67,9 +67,7 @@ public final class ListsBindingUtils {
     }
 
     public static TopLevelList topLevelList(final TopLevelListKey key, final TreeComplexUsesAugment augment) {
-        final TopLevelListBuilder builder = new TopLevelListBuilder().withKey(key);
-        builder.addAugmentation(TreeComplexUsesAugment.class, augment);
-        return builder.build();
+        return new TopLevelListBuilder().withKey(key).addAugmentation(TreeComplexUsesAugment.class, augment).build();
     }
 
     public static TreeComplexUsesAugment complexUsesAugment(final ListViaUsesKey... keys) {