summaryrefslogtreecommitdiffstats
path: root/vpp-classifier/impl/src/main/java/io
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 /vpp-classifier/impl/src/main/java/io
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 'vpp-classifier/impl/src/main/java/io')
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java16
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java6
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java4
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java2
8 files changed, 18 insertions, 18 deletions
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java
index 62a4f79fd..e170ebcfe 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/InterfacePolicerCustomizer.java
@@ -104,7 +104,7 @@ final class InterfacePolicerCustomizer extends FutureJVppCustomizer
private Optional<Integer> readTableIndex(@Nonnull final InstanceIdentifier<Policer> id, final int ifcIndex,
final byte type,
final ModificationCache cache) throws ReadFailedException {
- final com.google.common.base.Optional<PolicerClassifyDetailsReplyDump> dump =
+ final java.util.Optional<PolicerClassifyDetailsReplyDump> dump =
dumpManager.getDump(id, cache, type);
if (!dump.isPresent() || dump.get().policerClassifyDetails.isEmpty()) {
return Optional.empty();
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java
index 6445828c0..6d0295e89 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/policer/read/PolicerCustomizer.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.policer.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.primitives.Longs;
import com.google.common.primitives.UnsignedInts;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java
index 3dda5d3de..bd7bcb0ef 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManager.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.vpp.classifier.context;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.honeycomb.translate.MappingContext;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java
index c4b48acdc..06cdcb2e3 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/context/VppClassifierContextManagerImpl.java
@@ -20,7 +20,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import com.google.inject.Inject;
import io.fd.honeycomb.translate.MappingContext;
@@ -33,8 +33,8 @@ import java.util.stream.Collector;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Named;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.classifier.context.rev170502.VppClassifierContext;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.classifier.context.rev170502.VppClassifierContextBuilder;
import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.classifier.context.rev170502.vpp.classifier.context.ClassifyTableContext;
@@ -124,9 +124,9 @@ public final class VppClassifierContextManagerImpl implements VppClassifierConte
public Optional<String> getTableBaseNode(@Nonnull final String name, @Nonnull final MappingContext ctx) {
final Optional<ClassifyTableContext> read = ctx.read(getMappingIid(name));
if (read.isPresent()) {
- return Optional.fromNullable(read.get().getClassifierNodeName());
+ return Optional.ofNullable(read.get().getClassifierNodeName());
}
- return Optional.absent();
+ return Optional.empty();
}
@Override
@@ -146,15 +146,15 @@ public final class VppClassifierContextManagerImpl implements VppClassifierConte
@Override
public Optional<String> getNodeName(final int tableIndex, final int nodeIndex, @Nonnull final MappingContext ctx) {
if (!containsName(tableIndex, ctx)) {
- return Optional.absent();
+ return Optional.empty();
}
final String tableName = getTableName(tableIndex, ctx);
final Optional<ClassifyTableContext> tableCtx = ctx.read(getMappingIid(tableName));
final List<NodeContext> nodeContext = tableCtx.get().getNodeContext();
if (nodeContext == null) {
- return Optional.absent();
+ return Optional.empty();
}
- return Optional.fromNullable(nodeContext.stream()
+ return Optional.ofNullable(nodeContext.stream()
.filter(n -> n.getIndex().equals(nodeIndex))
.findFirst()
.map(nodes -> nodes.getName())
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java
index ffe6b263c..9c69433f0 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifySessionReader.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.vpp.classifier.read;
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import com.google.common.primitives.UnsignedInts;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
@@ -185,7 +185,7 @@ public class ClassifySessionReader extends FutureJVppCustomizer
final List<ClassifySessionDetails> filteredSessions = details.stream()
.filter(singleDetail -> Arrays.equals(singleDetail.match, match)).collect(Collectors.toList());
if (filteredSessions.isEmpty()) {
- return Optional.absent();
+ return Optional.empty();
} else if (filteredSessions.size() == 1) {
return Optional.of(filteredSessions.get(0));
} else {
@@ -194,7 +194,7 @@ public class ClassifySessionReader extends FutureJVppCustomizer
filteredSessions.size()));
}
}
- return Optional.absent();
+ return Optional.empty();
}
@Nonnull
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
index 4139a7187..61859b16a 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
@@ -18,7 +18,7 @@ package io.fd.hc2vpp.vpp.classifier.read;
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.Optional;
+import java.util.Optional;
import com.google.common.base.Preconditions;
import com.google.common.primitives.UnsignedInts;
import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer;
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java
index e8a33a484..965860c82 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/VppNodeReader.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.vpp.classifier.read;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.vpp.classifier.context.VppClassifierContextManager;
import io.fd.honeycomb.translate.MappingContext;
import javax.annotation.Nonnull;
@@ -38,7 +38,7 @@ interface VppNodeReader {
final PacketHandlingAction action = PacketHandlingAction.forValue(nodeIndex);
if (action == null) {
return vppClassifierContextManager.getNodeName(tableIndex, nodeIndex, ctx)
- .transform(nodeName -> new VppNode(new VppNodeName(nodeName)));
+ .map(nodeName -> new VppNode(new VppNodeName(nodeName)));
}
return Optional.of(new VppNode(action));
}
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java
index d50dbda89..72829fcb0 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriter.java
@@ -16,7 +16,7 @@
package io.fd.hc2vpp.vpp.classifier.write;
-import com.google.common.base.Optional;
+import java.util.Optional;
import io.fd.hc2vpp.common.translate.util.ByteDataTranslator;
import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer;
import io.fd.hc2vpp.common.translate.util.NamingContext;