diff options
Diffstat (limited to 'context/context-test-utils/src/main')
16 files changed, 30 insertions, 20 deletions
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextBooleanItem.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextBooleanItem.java index 7f019f57c..3afd5c89d 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextBooleanItem.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextBooleanItem.java @@ -32,7 +32,7 @@ public class TestContextBooleanItem implements Serializable { private static final long serialVersionUID = 7241008665286367796L; - private boolean flag = false;; + private boolean flag = false; /** * The Constructor. diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java index 888394be2..b4e9ad37d 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java @@ -273,9 +273,8 @@ public class ContextInstantiation { try { externalContextAlbum.put("TestExternalContextItem00A", null); } catch (final ContextRuntimeException e) { - assertEquals( - "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItem00A\" for put()", - e.getMessage()); + assertEquals("album \"ExternalContextAlbum:0.0.1\" null values are illegal on key " + + "\"TestExternalContextItem00A\" for put()", e.getMessage()); } assertEquals(tciAA, externalContextItem.getTestExternalContextItem00A()); @@ -302,25 +301,24 @@ public class ContextInstantiation { try { externalContextAlbum.put("TestExternalContextItem00A", null); } catch (final ContextRuntimeException e) { - assert (e.getMessage().equals( - "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItem00A\" for put()")); + assert (e.getMessage().equals("album \"ExternalContextAlbum:0.0.1\" null values are illegal on key " + + "\"TestExternalContextItem00A\" for put()")); } assertTrue(externalContextAlbum.get(EXTERNAL_CONTEXT).equals(externalContext)); try { externalContextAlbum.put("TestExternalContextItemFFF", null); } catch (final ContextRuntimeException e) { - assert (e.getMessage().equals( - "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItemFFF\" for put()")); + assert (e.getMessage().equals("album \"ExternalContextAlbum:0.0.1\" null values are illegal on key " + + "\"TestExternalContextItemFFF\" for put()")); } assertEquals(1, externalContextAlbum.size()); try { externalContextAlbum.put("TestExternalContextItemFFF", null); } catch (final ContextRuntimeException e) { - assertEquals( - "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItemFFF\" for put()", - e.getMessage()); + assertEquals("album \"ExternalContextAlbum:0.0.1\" null values are illegal on key " + + "\"TestExternalContextItemFFF\" for put()", e.getMessage()); } assertEquals(1, externalContextAlbum.size()); diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java index 33100165b..8f066c8e3 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java @@ -94,9 +94,9 @@ public class ContextUpdate { longContextAlbum.put(_0, ZERO); fail(EXCEPTION_MESSAGE); } catch (final ContextRuntimeException e) { - assertEquals( - "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum:0.0.1: object \"zero\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\"", - e.getMessage()); + assertEquals("Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\":" + + " LongContextAlbum:0.0.1: object \"zero\" of class \"java.lang.String\" not compatible with" + + " class \"java.lang.Long\"", e.getMessage()); } try { @@ -104,7 +104,8 @@ public class ContextUpdate { fail(EXCEPTION_MESSAGE); } catch (final ContextRuntimeException e) { assertEquals( - "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum:0.0.1: object \"\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\"", + "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum" + + ":0.0.1: object \"\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\"", e.getMessage()); } diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/AlbumModifier.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/AlbumModifier.java index 24e633109..14ceba425 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/AlbumModifier.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/AlbumModifier.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.lock.modifier; import org.onap.policy.apex.context.ContextAlbum; diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/LockType.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/LockType.java index 0dd0e7224..c0ac36264 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/LockType.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/LockType.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.lock.modifier; import org.onap.policy.apex.context.ContextRuntimeException; diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/NoLockAlbumModifier.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/NoLockAlbumModifier.java index b6ee1b8eb..6c273a0ae 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/NoLockAlbumModifier.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/NoLockAlbumModifier.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.lock.modifier; import java.util.Random; diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/ReadLockAlbumModifier.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/ReadLockAlbumModifier.java index 57c6b7524..854179ccd 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/ReadLockAlbumModifier.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/ReadLockAlbumModifier.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.lock.modifier; import java.util.Random; diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/SingleValueWriteLockAlbumModifier.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/SingleValueWriteLockAlbumModifier.java index a41de8dd7..959e93c67 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/SingleValueWriteLockAlbumModifier.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/SingleValueWriteLockAlbumModifier.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.lock.modifier; import static org.onap.policy.apex.context.test.utils.Constants.TEST_VALUE; diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/WriteLockAlbumModifier.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/WriteLockAlbumModifier.java index 09e280026..d1f5ec17e 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/WriteLockAlbumModifier.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/lock/modifier/WriteLockAlbumModifier.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.lock.modifier; import java.util.Random; diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java index fc1c830e7..020bc4169 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java @@ -120,8 +120,8 @@ public final class ConcurrentContextJVM { // An even number of arguments greater than 3 if (args.length < 9) { LOGGER.error("invalid arguments: " + Arrays.toString(args)); - LOGGER.error( - "usage: TestConcurrentContextJVM testType jvmNo threadCount threadLoops albumSize lockType [parameterKey parameterJson].... "); + LOGGER.error("usage: TestConcurrentContextJVM testType jvmNo threadCount threadLoops albumSize " + + "lockType [parameterKey parameterJson].... "); return; } diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ConfigrationProvider.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ConfigrationProvider.java index d17f32269..b842f7aca 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ConfigrationProvider.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ConfigrationProvider.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.utils; import java.util.Map; diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ConfigrationProviderImpl.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ConfigrationProviderImpl.java index 50429099e..f04cf5b39 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ConfigrationProviderImpl.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ConfigrationProviderImpl.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.utils; import java.util.HashMap; @@ -135,7 +136,7 @@ public class ConfigrationProviderImpl implements ConfigrationProvider { public Map<String, Object> getContextAlbumInitValues() { final Map<String, Object> values = new HashMap<>(); for (int i = 0; i < albumSize; i++) { - values.put(Integer.toString(i), new TestContextLongItem(0l)); + values.put(Integer.toString(i), new TestContextLongItem(0L)); } return values; } diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/Constants.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/Constants.java index 933c68b11..118586437 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/Constants.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/Constants.java @@ -59,7 +59,7 @@ public class Constants { private static final AxArtifactKey KEY3 = new AxArtifactKey("testC-bot", VERSION); private static final AxArtifactKey KEY2 = new AxArtifactKey("testC-next", VERSION); - private static final AxArtifactKey[] USED_ARTIFACT_STACK_ARRAY = new AxArtifactKey[] {KEY, KEY2, KEY3};; + private static final AxArtifactKey[] USED_ARTIFACT_STACK_ARRAY = new AxArtifactKey[] {KEY, KEY2, KEY3}; public static final AxArtifactKey[] getAxArtifactKeyArray() { return USED_ARTIFACT_STACK_ARRAY; diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/IntegrationThreadFactory.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/IntegrationThreadFactory.java index b5ea84d2f..d815c6b74 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/IntegrationThreadFactory.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/IntegrationThreadFactory.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.utils; import java.util.concurrent.ThreadFactory; diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/NetworkUtils.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/NetworkUtils.java index 01331f2a7..8d2c89254 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/NetworkUtils.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/NetworkUtils.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.utils; import java.net.InetAddress; @@ -36,7 +37,7 @@ public class NetworkUtils { * function sets the address to be the first non-loopback IPv4 address on a host * * @return Set of IPv4 addresses - * @throws SocketException + * @throws SocketException throw socket exception if error occurs */ public static TreeSet<String> getIPv4NonLoopAddresses() throws SocketException { final TreeSet<String> ipAddressSet = new TreeSet<String>(); diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ZooKeeperServerServiceProvider.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ZooKeeperServerServiceProvider.java index 67bb8878b..ffcbb351c 100644 --- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ZooKeeperServerServiceProvider.java +++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/ZooKeeperServerServiceProvider.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.context.test.utils; import java.io.File; |