From 37039138afcddedb1af4035aae5fb6c603c4c4e1 Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Thu, 11 Apr 2019 04:18:16 -0400 Subject: HC2VPP-397: add support for java 11 - dependency updates - compilation error fixes - javadoc fixes Change-Id: Ic7371931b0728c888a39350a77c959121afb9786 Signed-off-by: Michal Cmarada --- vpp-common/vpp-common-integration/pom.xml | 4 ++-- .../io/fd/hc2vpp/common/test/read/JvppDumpExecutorTest.java | 10 ++++++++++ .../java/io/fd/hc2vpp/common/test/util/FutureProducer.java | 3 +++ .../io/fd/hc2vpp/common/test/util/NamingContextHelper.java | 4 ++-- .../io/fd/hc2vpp/common/test/write/WriterCustomizerTest.java | 2 ++ vpp-common/vpp-translate-utils/pom.xml | 2 +- .../fd/hc2vpp/common/translate/util/TagRewriteOperation.java | 2 +- 7 files changed, 21 insertions(+), 6 deletions(-) (limited to 'vpp-common') diff --git a/vpp-common/vpp-common-integration/pom.xml b/vpp-common/vpp-common-integration/pom.xml index 4c96405fd..f56773885 100644 --- a/vpp-common/vpp-common-integration/pom.xml +++ b/vpp-common/vpp-common-integration/pom.xml @@ -31,7 +31,7 @@ 19.04-SNAPSHOT - 1.3 + 2.1 @@ -111,7 +111,7 @@ org.hamcrest - hamcrest-all + hamcrest ${hamcrest.version} test diff --git a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/read/JvppDumpExecutorTest.java b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/read/JvppDumpExecutorTest.java index 45c28aace..88a012641 100644 --- a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/read/JvppDumpExecutorTest.java +++ b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/read/JvppDumpExecutorTest.java @@ -61,6 +61,11 @@ public abstract class JvppDumpExecutorTest> i /** * Return pre-stubed mock that will throw {@link TimeoutException}, * while performing desired method + * + * @return pre-stubed mock that will throw {@link TimeoutException} + * @throws InterruptedException when the operation is interrupted + * @throws ExecutionException when execution fails + * @throws TimeoutException when timeout occurs */ protected FutureJVppCore doThrowTimeoutExceptionWhen() throws InterruptedException, ExecutionException, TimeoutException { @@ -76,6 +81,8 @@ public abstract class JvppDumpExecutorTest> i /** * Return pre-stubed mock that will throw {@link VppInvocationException}, * while performing desired method + * + * @return pre-stubed mock that will throw {@link VppInvocationException} */ protected FutureJVppCore doThrowFailExceptionWhen() { return doReturn(failedFuture()).when(api); @@ -84,6 +91,9 @@ public abstract class JvppDumpExecutorTest> i /** * Return pre-stubed mock that will return specified result * while performing desired method + * + * @param replyDump type of reply dump + * @return pre-stubed mock that will return specified result */ protected FutureJVppCore doReturnResponseWhen(U replyDump) { return doReturn(future(replyDump)).when(api); diff --git a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/FutureProducer.java b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/FutureProducer.java index b2771239d..7e1599704 100644 --- a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/FutureProducer.java +++ b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/FutureProducer.java @@ -33,6 +33,7 @@ public interface FutureProducer { * * @param result returned when {@link CompletableFuture#get()} is invoked * @param the result type of returned future + * @return {@link CompletableFuture} with desired result */ default CompletableFuture future(@Nonnull final T result) { final CompletableFuture future = new CompletableFuture<>(); @@ -45,6 +46,7 @@ public interface FutureProducer { * * @param exception to be thrown when {@link CompletableFuture#get()} is invoked * @param the result type of returned future + * @return {@link CompletableFuture} with provided {@link Exception} as a result */ default CompletableFuture failedFuture(@Nonnull final Exception exception) { final CompletableFuture future = new CompletableFuture<>(); @@ -56,6 +58,7 @@ public interface FutureProducer { * Returns {@link CompletableFuture} with VppCallbackException(retval = -1) as a cause. * * @param the result type of returned future + * @return {@link CompletableFuture} with VppCallbackException(retval = -1) as a cause */ default CompletableFuture failedFuture() { return failedFuture(new VppCallbackException("test-call", "test error msg", 1 /* ctxId */, -1 /* retval */)); diff --git a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java index f4f9790c2..5273a5a6b 100644 --- a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java +++ b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/util/NamingContextHelper.java @@ -35,7 +35,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; /** - * Utility that helps stubbing {@link io.fd.hc2vpp.common.translate.util.NamingContext} methods. + * Utility that helps stubbing {@link NamingContext} methods. */ // TODO(HONEYCOMB-226): the class needs to be refactored or even removed after extracting interface from NamingContext public interface NamingContextHelper { @@ -86,7 +86,7 @@ public interface NamingContextHelper { } /** - * Stubs {@link MappingContext#read} for given {@link NamingContext} to return {@link Optional#absent} for provided + * Stubs {@link MappingContext#read} for given {@link NamingContext} to return {@link Optional#empty} for provided * name. * * @param mappingContext mock instance of {@link MappingContext} diff --git a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/write/WriterCustomizerTest.java b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/write/WriterCustomizerTest.java index 6a8fc2410..7edb964cc 100644 --- a/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/write/WriterCustomizerTest.java +++ b/vpp-common/vpp-translate-test/src/main/java/io/fd/hc2vpp/common/test/write/WriterCustomizerTest.java @@ -57,6 +57,8 @@ public abstract class WriterCustomizerTest implements FutureProducer, /** * Optional setup for subclasses. Invoked after parent initialization. + * + * @throws Exception unspecified exception while setting up tests */ protected void setUpTest() throws Exception { // this method would normally trigger this warning while compiling: diff --git a/vpp-common/vpp-translate-utils/pom.xml b/vpp-common/vpp-translate-utils/pom.xml index 0d87515a6..ae49ca563 100644 --- a/vpp-common/vpp-translate-utils/pom.xml +++ b/vpp-common/vpp-translate-utils/pom.xml @@ -94,7 +94,7 @@ org.hamcrest - hamcrest-all + hamcrest test diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/TagRewriteOperation.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/TagRewriteOperation.java index 32b2b16cd..25c7862b2 100644 --- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/TagRewriteOperation.java +++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/TagRewriteOperation.java @@ -23,7 +23,7 @@ import javax.annotation.Nullable; /** * Defines vlan tag rewrite config options for VPP. - *

+ * * TODO HONEYCOMB-184 corresponding enum (defined in l2_vtr.h) should be defined in vpe.api * (does vpp's IDL support enum type definition?) * which would allow to generate this class in jvpp -- cgit 1.2.3-korg