aboutsummaryrefslogtreecommitdiffstats
path: root/context/context-test-utils/src/main/java
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-10 17:05:36 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-10 17:07:47 +0100
commitd100854291559df1426ea1e64351872ae2d3867b (patch)
tree78baab90111307cd3d2460b2cca37e93a20ac9a3 /context/context-test-utils/src/main/java
parent8f82d7adcb53b349e14d3b356bda03588a554f95 (diff)
Checkstyle changes for apex model
Fix checkstyle warnings in the apex mode and knock on changes. Issue-ID: POLICY-1034 Change-Id: I10537e4288e9cad5ef18165ed2cdc1d3ab3139c1 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'context/context-test-utils/src/main/java')
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateLocaleItem.java12
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateTzItem.java8
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java22
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java6
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java14
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java2
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJvm.java (renamed from context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java)10
-rw-r--r--context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJvmThread.java (renamed from context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java)8
8 files changed, 41 insertions, 41 deletions
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateLocaleItem.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateLocaleItem.java
index 0c94bcb1d..efad26052 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateLocaleItem.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateLocaleItem.java
@@ -107,7 +107,7 @@ public class TestContextDateLocaleItem implements Serializable {
*
* @return the TZ value
*/
- public String getTZValue() {
+ public String getTzValue() {
return timeZoneString;
}
@@ -116,7 +116,7 @@ public class TestContextDateLocaleItem implements Serializable {
*
* @param tzValue the TZ value
*/
- public void setTZValue(final String tzValue) {
+ public void setTzValue(final String tzValue) {
this.timeZoneString = TimeZone.getTimeZone(tzValue).getDisplayName();
}
@@ -125,7 +125,7 @@ public class TestContextDateLocaleItem implements Serializable {
*
* @return the dst
*/
- public boolean getDST() {
+ public boolean getDst() {
return dst;
}
@@ -134,7 +134,7 @@ public class TestContextDateLocaleItem implements Serializable {
*
* @param newDst the dst
*/
- public void setDST(final boolean newDst) {
+ public void setDst(final boolean newDst) {
this.dst = newDst;
}
@@ -143,7 +143,7 @@ public class TestContextDateLocaleItem implements Serializable {
*
* @return the UTC offset
*/
- public int getUTCOffset() {
+ public int getUtcOffset() {
return utcOffset;
}
@@ -152,7 +152,7 @@ public class TestContextDateLocaleItem implements Serializable {
*
* @param newUtcOffset the UTC offset
*/
- public void setUTCOffset(final int newUtcOffset) {
+ public void setUtcOffset(final int newUtcOffset) {
this.utcOffset = newUtcOffset;
}
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateTzItem.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateTzItem.java
index 7d3ed80d5..7e1e32924 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateTzItem.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateTzItem.java
@@ -91,7 +91,7 @@ public class TestContextDateTzItem implements Serializable {
*
* @return the TZ value
*/
- public String getTZValue() {
+ public String getTzValue() {
return timeZoneString;
}
@@ -100,7 +100,7 @@ public class TestContextDateTzItem implements Serializable {
*
* @param tzValue the TZ value
*/
- public void setTZValue(final String tzValue) {
+ public void setTzValue(final String tzValue) {
this.timeZoneString = TimeZone.getTimeZone(tzValue).getDisplayName();
}
@@ -109,7 +109,7 @@ public class TestContextDateTzItem implements Serializable {
*
* @return the dst
*/
- public boolean getDST() {
+ public boolean getDst() {
return dst;
}
@@ -118,7 +118,7 @@ public class TestContextDateTzItem implements Serializable {
*
* @param newDst the dst
*/
- public void setDST(final boolean newDst) {
+ public void setDst(final boolean newDst) {
this.dst = newDst;
}
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 0fd013da7..084220c2f 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
@@ -190,8 +190,8 @@ public class ContextInstantiation {
final AxContextModel externalContextModel = TestContextAlbumFactory.createExternalContextModel();
final TestContextDateTzItem tci9A = new TestContextDateTzItem(tci9);
- final TestContextDateLocaleItem tciAA = new TestContextDateLocaleItem(tciA);
- final TestExternalContextItem externalContext = getTestExternalContextItem(testDate, tci9A, tciAA);
+ final TestContextDateLocaleItem tciA_A = new TestContextDateLocaleItem(tciA);
+ final TestExternalContextItem externalContext = getTestExternalContextItem(testDate, tci9A, tciA_A);
final Map<String, Object> valueMap2 = new HashMap<>();
valueMap2.put(EXTERNAL_CONTEXT, externalContext);
@@ -226,7 +226,7 @@ public class ContextInstantiation {
assertEquals(tci9A.getDateValue().getTime(),
externalContextItem.getTestExternalContextItem009().getDateValue().getTime());
- assertEquals(tciAA.getDateValue().getTime(),
+ assertEquals(tciA_A.getDateValue().getTime(),
externalContextItem.getTestExternalContextItem00A().getDateValue().getTime());
assertEquals(TEST_TREE_SET, externalContextItem.getTestExternalContextItem00B().getSetValue());
assertEquals(TEST_HASH_MAP, externalContextItem.getTestExternalContextItem00C().getMapValue());
@@ -275,7 +275,7 @@ public class ContextInstantiation {
assertEquals("album \"ExternalContextAlbum:0.0.1\" null values are illegal on key "
+ "\"TestExternalContextItem00A\" for put()", e.getMessage());
}
- assertEquals(tciAA, externalContextItem.getTestExternalContextItem00A());
+ assertEquals(tciA_A, externalContextItem.getTestExternalContextItem00A());
// Should return the hash set
assertEquals(TEST_TREE_SET, externalContextItem.getTestExternalContextItem00B().getSetValue());
@@ -471,9 +471,9 @@ public class ContextInstantiation {
private TestContextDateLocaleItem getTestContextDateLocaleItem(final Date testDate) {
final TestContextDateLocaleItem tciA = new TestContextDateLocaleItem();
tciA.setDateValue(new TestContextDateItem(testDate));
- tciA.setTZValue(TIME_ZONE.getDisplayName());
- tciA.setDST(true);
- tciA.setUTCOffset(-600);
+ tciA.setTzValue(TIME_ZONE.getDisplayName());
+ tciA.setDst(true);
+ tciA.setUtcOffset(-600);
tciA.setLocale(Locale.ENGLISH);
return tciA;
}
@@ -481,13 +481,13 @@ public class ContextInstantiation {
private TestContextDateTzItem getTestContextDateTzItem(final Date testDate) {
final TestContextDateTzItem tci9 = new TestContextDateTzItem();
tci9.setDateValue(new TestContextDateItem(testDate));
- tci9.setTZValue(TIME_ZONE.getDisplayName());
- tci9.setDST(true);
+ tci9.setTzValue(TIME_ZONE.getDisplayName());
+ tci9.setDst(true);
return tci9;
}
private TestExternalContextItem getTestExternalContextItem(final Date testDate, final TestContextDateTzItem tci9A,
- final TestContextDateLocaleItem tciAA) {
+ final TestContextDateLocaleItem tciAa) {
final TestExternalContextItem externalContext = new TestExternalContextItem();
final TestContextBooleanItem testExternalContextItem000 = new TestContextBooleanItem(false);
@@ -513,7 +513,7 @@ public class ContextInstantiation {
externalContext.setTestExternalContextItem007(testExternalContextItem007);
externalContext.setTestExternalContextItem008(testExternalContextItem008);
externalContext.setTestExternalContextItem009(tci9A);
- externalContext.setTestExternalContextItem00A(tciAA);
+ externalContext.setTestExternalContextItem00A(tciAa);
externalContext.setTestExternalContextItem00B(testExternalContextItem00B);
externalContext.setTestExternalContextItem00C(testExternalContextItem00C);
return externalContext;
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 8f066c8e3..95d14324c 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
@@ -149,9 +149,9 @@ public class ContextUpdate {
private TestContextDateLocaleItem getTestContextDateLocaleItem() {
final TestContextDateLocaleItem tciA = new TestContextDateLocaleItem();
tciA.setDateValue(new TestContextDateItem(new Date()));
- tciA.setTZValue(TIME_ZONE.getDisplayName());
- tciA.setDST(true);
- tciA.setUTCOffset(-600);
+ tciA.setTzValue(TIME_ZONE.getDisplayName());
+ tciA.setDst(true);
+ tciA.setUtcOffset(-600);
tciA.setLocale(Locale.ENGLISH);
return tciA;
}
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java
index 4041c079d..244bd7d24 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java
@@ -253,9 +253,9 @@ public class SequentialContextInstantiation {
// Should return null
assertNull(dateAlbum.get("ItemNull"));
// Put should return the previous contextItem
- tciA00.setDST(false);
+ tciA00.setDst(false);
final TestContextDateLocaleItem tciA03_clone = new TestContextDateLocaleItem(tciA03);
- tciA03_clone.setDST(true);
+ tciA03_clone.setDst(true);
TestContextDateLocaleItem retItem = (TestContextDateLocaleItem) dateAlbum.put("Item03", tciA03_clone);
assertEquals(tciA03, retItem);
retItem = (TestContextDateLocaleItem) dateAlbum.put("Item03", tciA03);
@@ -332,17 +332,17 @@ public class SequentialContextInstantiation {
private TestContextDateTzItem getTestContextDateTzItem(final Date testDate) {
final TestContextDateTzItem tci9 = new TestContextDateTzItem();
tci9.setDateValue(new TestContextDateItem(testDate));
- tci9.setTZValue(TimeZone.getTimeZone("Europe/Dublin").getDisplayName());
- tci9.setDST(true);
+ tci9.setTzValue(TimeZone.getTimeZone("Europe/Dublin").getDisplayName());
+ tci9.setDst(true);
return tci9;
}
private TestContextDateLocaleItem getTestContextDateLocaleItem() {
final TestContextDateLocaleItem tciA00 = new TestContextDateLocaleItem();
tciA00.setDateValue(new TestContextDateItem(new Date()));
- tciA00.setTZValue(TIME_ZONE.getDisplayName());
- tciA00.setDST(true);
- tciA00.setUTCOffset(-600);
+ tciA00.setTzValue(TIME_ZONE.getDisplayName());
+ tciA00.setDst(true);
+ tciA00.setUtcOffset(-600);
tciA00.setLocale(Locale.ENGLISH);
return tciA00;
}
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java
index 4f6dd9b1f..88cdccc88 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java
@@ -96,7 +96,7 @@ public class ConcurrentContext {
} else {
// Spawn JVMs to run the tests
for (int j = 0; j < configrationProvider.getJvmCount(); j++) {
- final ConcurrentContextJVMThread task = new ConcurrentContextJVMThread(j, configrationProvider);
+ final ConcurrentContextJvmThread task = new ConcurrentContextJvmThread(j, configrationProvider);
tasks.add(task);
executorService.execute(task);
}
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 0f6900dbb..7d7548569 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
@@ -54,9 +54,9 @@ import org.slf4j.ext.XLoggerFactory;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public final class ConcurrentContextJVM {
+public final class ConcurrentContextJvm {
// Logger for this class
- private static final XLogger LOGGER = XLoggerFactory.getXLogger(ConcurrentContextJVM.class);
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(ConcurrentContextJvm.class);
private static final int IPV4_ADDRESS_LENGTH = 4;
@@ -66,7 +66,7 @@ public final class ConcurrentContextJVM {
private final ConfigrationProvider configrationProvider;
- private ConcurrentContextJVM(final int jvmNo, final ConfigrationProvider configrationProvider) {
+ private ConcurrentContextJvm(final int jvmNo, final ConfigrationProvider configrationProvider) {
this.jvmNo = jvmNo;
this.configrationProvider = configrationProvider;
final String name = configrationProvider.getTestName() + ":ConcurrentContextThread_" + jvmNo;
@@ -157,8 +157,8 @@ public final class ConcurrentContextJVM {
try {
final ConfigrationProvider configrationProvider =
new ConfigrationProviderImpl(testName, 1, threadCount, threadLoops, albumSize, lockType);
- final ConcurrentContextJVM concurrentContextJVM = new ConcurrentContextJVM(jvmNo, configrationProvider);
- concurrentContextJVM.execute();
+ final ConcurrentContextJvm concurrentContextJvm = new ConcurrentContextJvm(jvmNo, configrationProvider);
+ concurrentContextJvm.execute();
} catch (final Exception e) {
LOGGER.error("error running test in JVM", e);
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJvmThread.java
index 0c2aa7a90..339c95d26 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJvmThread.java
@@ -43,15 +43,15 @@ import org.slf4j.ext.XLoggerFactory;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public class ConcurrentContextJVMThread implements Runnable, Closeable {
+public class ConcurrentContextJvmThread implements Runnable, Closeable {
// Logger for this class
- private static final XLogger LOGGER = XLoggerFactory.getXLogger(ConcurrentContextJVMThread.class);
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(ConcurrentContextJvmThread.class);
private final int jvm;
private final ConfigrationProvider configrationProvider;
private Process process = null;
- public ConcurrentContextJVMThread(final int jvm, final ConfigrationProvider configrationProvider) {
+ public ConcurrentContextJvmThread(final int jvm, final ConfigrationProvider configrationProvider) {
this.jvm = jvm;
this.configrationProvider = configrationProvider;
}
@@ -70,7 +70,7 @@ public class ConcurrentContextJVMThread implements Runnable, Closeable {
commandList.add("-Xmx512m");
commandList.add("-cp");
commandList.add(System.getProperty("java.class.path"));
- commandList.add(ConcurrentContextJVM.class.getCanonicalName());
+ commandList.add(ConcurrentContextJvm.class.getCanonicalName());
commandList.add(configrationProvider.getTestName());
commandList.add(new Integer(jvm).toString());
commandList.add(new Integer(configrationProvider.getThreadCount()).toString());