diff options
author | Michal Cmarada <mcmarada@cisco.com> | 2019-04-11 04:18:16 -0400 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2019-04-11 04:18:16 -0400 |
commit | 37039138afcddedb1af4035aae5fb6c603c4c4e1 (patch) | |
tree | 50764c40df951b4e7bd4afa027ec86c346ad4075 /vpp-common | |
parent | d726d0f173544c8d0078c5f918b5d086f6e85f79 (diff) |
HC2VPP-397: add support for java 11
- dependency updates
- compilation error fixes
- javadoc fixes
Change-Id: Ic7371931b0728c888a39350a77c959121afb9786
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'vpp-common')
7 files changed, 21 insertions, 6 deletions
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 @@ <properties> <jvpp.version>19.04-SNAPSHOT</jvpp.version> - <hamcrest.version>1.3</hamcrest.version> + <hamcrest.version>2.1</hamcrest.version> </properties> <build> @@ -111,7 +111,7 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> + <artifactId>hamcrest</artifactId> <version>${hamcrest.version}</version> <scope>test</scope> </dependency> 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<T extends EntityDumpExecutor<?, ?>> 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<T extends EntityDumpExecutor<?, ?>> 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<T extends EntityDumpExecutor<?, ?>> 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 <U> 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 <T> the result type of returned future + * @return {@link CompletableFuture} with desired result */ default <T> CompletableFuture<T> future(@Nonnull final T result) { final CompletableFuture<T> future = new CompletableFuture<>(); @@ -45,6 +46,7 @@ public interface FutureProducer { * * @param exception to be thrown when {@link CompletableFuture#get()} is invoked * @param <T> the result type of returned future + * @return {@link CompletableFuture} with provided {@link Exception} as a result */ default <T> CompletableFuture<T> failedFuture(@Nonnull final Exception exception) { final CompletableFuture<T> future = new CompletableFuture<>(); @@ -56,6 +58,7 @@ public interface FutureProducer { * Returns {@link CompletableFuture} with VppCallbackException(retval = -1) as a cause. * * @param <T> the result type of returned future + * @return {@link CompletableFuture} with VppCallbackException(retval = -1) as a cause */ default <T> CompletableFuture<T> 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 @@ </dependency> <dependency> <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> + <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> </dependencies> 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. - * <p/> + * * 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 |