From 0736c9c93dff667dd2abaf5de92ca68ea64869d6 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 14 Feb 2019 17:40:47 +0100 Subject: [PATCH] Fix ImmutableUnkeyedListNodeBuilder.valueEquals() Returning an empty Set from getValue() means that if we ever encountered two instances of this class in comparison, their values would fail to compare, as valueEquals() expects a List. Fix this by returning ImmutableList.of() and codify that in the return value. Change-Id: I4301f4161648ea391f2e0a1e712e3f87c6dca33c Signed-off-by: Robert Varga (cherry picked from commit 25754bb0fdf91e8d48994f9c186e90f9f1901f5c) --- .../schema/builder/impl/ImmutableUnkeyedListNodeBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableUnkeyedListNodeBuilder.java b/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableUnkeyedListNodeBuilder.java index 4e08521e38..224d0aef84 100644 --- a/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableUnkeyedListNodeBuilder.java +++ b/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/builder/impl/ImmutableUnkeyedListNodeBuilder.java @@ -125,8 +125,8 @@ public class ImmutableUnkeyedListNodeBuilder implements CollectionNodeBuilder getValue() { - return Collections.emptySet(); + public ImmutableList getValue() { + return ImmutableList.of(); } @Override -- 2.36.6