summaryrefslogtreecommitdiffstats
path: root/vpp-common
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-common')
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java2
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java2
-rw-r--r--vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java
index fbf8900f6..3f5a56fb2 100644
--- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java
+++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java
@@ -85,7 +85,7 @@ public interface AddressTranslator extends Ipv4Translator, Ipv6Translator, MacTr
// safest way to compare addresses - prevents returning false while using different types from hierarchy
// Ex. Key for MapResolver contains Ipv4Address as value but we translate addresses from binary data to Ipv4AddressNoZone
default boolean addressesEqual(final IpAddress left, final IpAddress right) {
- return Arrays.equals(left.getValue(), right.getValue());
+ return left.stringValue().equalsIgnoreCase(right.stringValue());
}
/**
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
index 4d0e7a98f..9560e48b1 100644
--- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
+++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
@@ -116,7 +116,7 @@ public class MultiNamingContext {
// overrides old data with new(without removed child)
mappingContext.put(getMappingIid(parentName), new MappingBuilder()
.setName(mapping.getName())
- .setKey(mapping.getKey())
+ .withKey(mapping.key())
.setValue(mapping.getValue()
.stream()
.filter(value -> !value.getName().equals(childName))
diff --git a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java
index a111796a1..21a2d621b 100644
--- a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java
+++ b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java
@@ -194,7 +194,7 @@ public class MultiNamingContextTest implements InjectablesProcessor {
}
private Value valueFor(final String name, final int index) {
- return new ValueBuilder().setName(name).setIndex(index).setKey(new ValueKey(name)).build();
+ return new ValueBuilder().setName(name).setIndex(index).withKey(new ValueKey(name)).build();
}
}