Simplify code using Java 8 features
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / test / java / org / opendaylight / controller / md / sal / binding / impl / test / Bug3090MultiKeyList.java
index 57e1151..a150d24 100644 (file)
@@ -11,6 +11,7 @@ import com.google.common.collect.ImmutableSet;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import java.util.function.Function;
 import java.util.stream.Collectors;
@@ -50,7 +51,7 @@ public class Bug3090MultiKeyList extends AbstractDataTreeChangeListenerTest {
         final Root root = new RootBuilder().setListInRoot(listInRoots).build();
 
         final TestListener<Root> listener = createListener(LogicalDatastoreType.CONFIGURATION, ROOT_PATH,
-                match(ModificationType.WRITE, ROOT_PATH, dataBefore -> dataBefore == null,
+                match(ModificationType.WRITE, ROOT_PATH, Objects::isNull,
                         (Function<Root, Boolean>) dataAfter -> checkData(root, dataAfter)));
 
         final ReadWriteTransaction readWriteTransaction = getDataBroker().newReadWriteTransaction();

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.