summaryrefslogtreecommitdiffstats
path: root/model/engine-model/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-02-25 16:10:08 +0000
committerliamfallon <liam.fallon@est.tech>2020-02-26 08:33:06 +0000
commit35840d835f581c2d61de1c57fe9963e36eb15c9f (patch)
tree10b8a6004cad1b4d1d63ebebe2aa26ae2af7f3e4 /model/engine-model/src/test
parentaacc7442f046d44359934ea3d93f425a809e7616 (diff)
Fix Java 11/Checkstyle/Sonar warnings
A number of Java 11, checkstyle, and SONAR warnings have crept into the Apex codebase over the last number of reviews. This change fixes those issues. Issue-ID: POLICY-1913 Change-Id: I2afd607e80f48323355380fb2fe5e048e18879f9 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'model/engine-model/src/test')
-rw-r--r--model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
index c6fde1cdf..b35d40570 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,7 +35,8 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
/**
- * Test engine statistics.
+ * Test the engine statistics.
+ *
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class EngineStatsTest {
@@ -61,7 +62,7 @@ public class EngineStatsTest {
assertEquals("EngineKey:0.0.1:NULL:EngineStats", stats.getKeys().get(0).getId());
stats.setAverageExecutionTime(123.45);
- assertEquals(new Double(123.45), new Double(stats.getAverageExecutionTime()));
+ assertEquals(Double.valueOf(123.45), Double.valueOf(stats.getAverageExecutionTime()));
stats.setEventCount(987);
assertEquals(987, stats.getEventCount());
@@ -100,7 +101,7 @@ public class EngineStatsTest {
stats.engineStart();
stats.setEventCount(4);
stats.executionEnter(new AxArtifactKey());
-
+
synchronized (WAIT_LOCK) {
try {
WAIT_LOCK.wait(10);
@@ -141,7 +142,7 @@ public class EngineStatsTest {
assertTrue(stats.equals(stats));
assertTrue(stats.equals(clonedStats));
assertFalse(stats.equals(null));
- assertFalse(stats.equals((Object)"Hello"));
+ assertFalse(stats.equals("Hello"));
assertFalse(stats.equals(new AxEngineStats(new AxReferenceKey())));
assertEquals(0, stats.compareTo(stats));