diff options
author | Michal Cmarada <mcmarada@cisco.com> | 2019-04-01 11:39:35 +0200 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-04-08 13:39:49 +0200 |
commit | d726d0f173544c8d0078c5f918b5d086f6e85f79 (patch) | |
tree | 640e65411731b3a25abc2e7949de68dc625cf60e /acl/acl-impl/src/main/java | |
parent | 89eeb336aebc92cd34c27b3fa325803c6478a461 (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 'acl/acl-impl/src/main/java')
7 files changed, 12 insertions, 9 deletions
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AbstractAclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AbstractAclCustomizer.java index 9cc7e7d76..f5c1a27c9 100644 --- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AbstractAclCustomizer.java +++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AbstractAclCustomizer.java @@ -16,7 +16,7 @@ package io.fd.hc2vpp.acl.read; -import com.google.common.base.Optional; +import java.util.Optional; import com.google.common.collect.ImmutableSet; import io.fd.hc2vpp.acl.util.AclContextManager; import io.fd.hc2vpp.acl.util.FutureJVppAclCustomizer; diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java index 3d1516fd2..ebaf8b828 100644 --- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java +++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java @@ -16,7 +16,7 @@ package io.fd.hc2vpp.acl.read; -import com.google.common.base.Optional; +import java.util.Optional; import io.fd.hc2vpp.acl.util.AclContextManager; import io.fd.hc2vpp.acl.util.FutureJVppAclCustomizer; import io.fd.hc2vpp.acl.util.ace.AceConverter; diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/EgressAclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/EgressAclCustomizer.java index 14fdad2df..31b359c07 100644 --- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/EgressAclCustomizer.java +++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/EgressAclCustomizer.java @@ -17,7 +17,7 @@ package io.fd.hc2vpp.acl.read; -import com.google.common.base.Optional; +import java.util.Optional; import io.fd.hc2vpp.acl.util.AclContextManager; import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.hc2vpp.common.translate.util.NamingContext; diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/IngressAclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/IngressAclCustomizer.java index 02f2e18f2..59b0cc0ae 100644 --- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/IngressAclCustomizer.java +++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/IngressAclCustomizer.java @@ -18,7 +18,7 @@ package io.fd.hc2vpp.acl.read; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Optional; +import java.util.Optional; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Streams; import io.fd.hc2vpp.acl.util.AclContextManager; diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/InterfaceAclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/InterfaceAclCustomizer.java index 2cd1bdd87..be4da8a86 100644 --- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/InterfaceAclCustomizer.java +++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/InterfaceAclCustomizer.java @@ -17,7 +17,6 @@ package io.fd.hc2vpp.acl.read; -import com.google.common.base.Optional; import com.google.common.collect.Streams; import io.fd.hc2vpp.acl.util.FutureJVppAclCustomizer; import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; @@ -33,7 +32,9 @@ import io.fd.jvpp.acl.dto.MacipAclInterfaceListDetailsReplyDump; import io.fd.jvpp.acl.dto.MacipAclInterfaceListDump; import io.fd.jvpp.acl.future.FutureJVppAclFacade; import java.util.Collection; +import java.util.Collections; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.Nonnull; @@ -98,13 +99,15 @@ public class InterfaceAclCustomizer extends FutureJVppAclCustomizer implements final Optional<MacipAclInterfaceListDetailsReplyDump> macIpIfcDumpReply = macipAclInterfaceListDumpManager.getDump(instanceIdentifier, readContext.getModificationCache()); - Stream<InterfaceKey> stdAclIfcKeys = stdIfcDumpReply.asSet().stream() + Stream<InterfaceKey> stdAclIfcKeys = + stdIfcDumpReply.map(Collections::singleton).orElse(Collections.emptySet()).stream() .map(dump -> dump.aclInterfaceListDetails) .flatMap(Collection::stream) .filter(aclInterfaceListDetails -> aclInterfaceListDetails.acls.length != 0) .map(details -> getInterfaceKey(readContext, details.swIfIndex)); - Stream<InterfaceKey> macIpAclIfcKeys = macIpIfcDumpReply.asSet().stream() + Stream<InterfaceKey> macIpAclIfcKeys = + macIpIfcDumpReply.map(Collections::singleton).orElse(Collections.emptySet()).stream() .map(dump -> dump.macipAclInterfaceListDetails) .flatMap(Collection::stream) .map(details -> getInterfaceKey(readContext, details.swIfIndex)); diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/AclContextManagerImpl.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/AclContextManagerImpl.java index 898777478..be8a0d963 100644 --- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/AclContextManagerImpl.java +++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/AclContextManagerImpl.java @@ -20,7 +20,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static java.util.Objects.requireNonNull; -import com.google.common.base.Optional; +import java.util.Optional; import io.fd.honeycomb.translate.MappingContext; import io.fd.honeycomb.translate.util.RWUtils; import java.util.ArrayList; diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/AclValidator.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/AclValidator.java index b7aaebcff..cfdb34b4c 100644 --- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/AclValidator.java +++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/AclValidator.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.common.collect.ImmutableSet; import io.fd.hc2vpp.acl.AclIIds; |