summaryrefslogtreecommitdiffstats
path: root/routing/routing-impl
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-04-01 11:39:35 +0200
committerMichal Cmarada <mcmarada@cisco.com>2019-04-08 13:39:49 +0200
commitd726d0f173544c8d0078c5f918b5d086f6e85f79 (patch)
tree640e65411731b3a25abc2e7949de68dc625cf60e /routing/routing-impl
parent89eeb336aebc92cd34c27b3fa325803c6478a461 (diff)
HC2VPP-406: fix build errors after ODL bump to neon
This fixes build issues after ODL bump in Honeycomb (HONEYCOMB-443). Change-Id: I3bf203dd60d12057595b15ce1ad59302dc14e2a0 Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'routing/routing-impl')
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java4
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java2
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java6
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java2
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java2
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java6
11 files changed, 16 insertions, 16 deletions
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java
index 3fde2da4c..166537bce 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.routing.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.routing.trait.RouteMapper;
import io.fd.honeycomb.translate.ModificationCache;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java
index a78668d3d..55c33555a 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.routing.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.MultiNamingContext;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.routing.RoutingConfiguration;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java
index 3ff34abbd..c0d405bd9 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.routing.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.MultiNamingContext;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.routing.RoutingConfiguration;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java
index 77e0d1a3c..f3a4b7b0c 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.routing.write;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java
index d6fc3e6c6..a06078174 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizer.java
@@ -17,7 +17,7 @@
package io.fd.hc2vpp.routing.write;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
index d9cd5d1ee..391e6194f 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
@@ -17,7 +17,6 @@
package io.fd.hc2vpp.routing.write.trait;
import static com.google.common.base.Preconditions.checkArgument;
-import static org.apache.commons.lang3.StringUtils.isNotEmpty;
import com.google.common.collect.ImmutableSet.Builder;
import io.fd.hc2vpp.common.translate.util.AddressTranslator;
@@ -56,7 +55,8 @@ public interface RouteRequestProducer extends ByteDataTranslator, AddressTransla
default boolean classifyTablePresent(final String classifyTableName,
final VppClassifierContextManager classifierContextManager,
final MappingContext mappingContext) {
- return isNotEmpty(classifyTableName) &&
+
+ return classifyTableName != null && !classifyTableName.isEmpty() &&
classifierContextManager.containsTable(classifyTableName, mappingContext);
}
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java
index 103044fbe..350aa9688 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/RoutingModuleTest.java
@@ -45,7 +45,7 @@ import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.DataBroker;
public class RoutingModuleTest {
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java
index 6f45d9210..feaf85e63 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java
@@ -22,7 +22,7 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.fib.management.FibManagementIIds;
@@ -118,8 +118,8 @@ public class ControlPlaneProtocolCustomizerTest extends WriterCustomizerTest {
when(writeContext.readAfter(vrfIidV6)).thenReturn(Optional.of(
new TableBuilder().withKey(keyV6).setAddressFamily(keyV6.getAddressFamily())
.setTableId(keyV6.getTableId()).setName("VRF-IPV6-1").build()));
- when(writeContext.readAfter(invalidVrfIidV4)).thenReturn(Optional.absent());
- when(writeContext.readAfter(invalidVrfIidV6)).thenReturn(Optional.absent());
+ when(writeContext.readAfter(invalidVrfIidV4)).thenReturn(Optional.empty());
+ when(writeContext.readAfter(invalidVrfIidV6)).thenReturn(Optional.empty());
}
@Test(expected = WriteFailedException.class)
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java
index 2220a042e..b241c0ba6 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java
@@ -25,7 +25,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.ImmutableList;
import io.fd.hc2vpp.common.translate.util.NamingContext;
import io.fd.hc2vpp.fib.management.FibManagementIIds;
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java
index ec748e59f..f1804fe89 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java
@@ -19,7 +19,7 @@ package io.fd.hc2vpp.routing.write;
import static io.fd.hc2vpp.routing.helpers.InterfaceTestHelper.INTERFACE_INDEX;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.collect.ImmutableList;
import io.fd.hc2vpp.fib.management.FibManagementIIds;
import io.fd.hc2vpp.routing.Ipv6RouteData;
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java
index 883e52fea..d135fe316 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java
@@ -21,7 +21,7 @@ import static io.fd.hc2vpp.routing.helpers.InterfaceTestHelper.INTERFACE_INDEX;
import static io.fd.hc2vpp.routing.helpers.InterfaceTestHelper.INTERFACE_NAME;
import static org.mockito.Mockito.when;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
import io.fd.hc2vpp.common.translate.util.MultiNamingContext;
import io.fd.hc2vpp.common.translate.util.NamingContext;
@@ -120,8 +120,8 @@ abstract class RouteCustomizerTest extends WriterCustomizerTest implements Routi
when(writeContext.readAfter(TABLE_V6_IID)).thenReturn(Optional.of(
new TableBuilder().withKey(IPV6_TABLE_KEY).setAddressFamily(Ipv6.class)
.setTableId(IPV6_TABLE_KEY.getTableId()).build()));
- when(writeContext.readAfter(INVALID_TABLE_V4_IID)).thenReturn(Optional.absent());
- when(writeContext.readAfter(INVALID_TABLE_V6_IID)).thenReturn(Optional.absent());
+ when(writeContext.readAfter(INVALID_TABLE_V4_IID)).thenReturn(Optional.empty());
+ when(writeContext.readAfter(INVALID_TABLE_V6_IID)).thenReturn(Optional.empty());
}
}