From fad6fa4890538fe8f4cbb96ae3fb0be6767d28d1 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Thu, 27 Jun 2019 14:58:28 +0000 Subject: Fix Sonar/Checkstyle issues in apex-pdp BBS Java code introduced Sonar issues, these are resolved. Also fixed checkstyle errors in other classes. Also fiexed "unexpected type" eclipse errors. Issue-ID: POLICY-1791 Change-Id: I3931051f0944c6d53745c8dd1db7cca4ee118f1c Signed-off-by: liamfallon --- .../onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java | 3 ++- .../onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'model/engine-model/src/test/java') diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java index 392bdd53b..fe834b43e 100644 --- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java +++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -115,7 +116,7 @@ public class EngineModelTest { assertTrue(model.equals(model)); assertTrue(model.equals(clonedModel)); - assertFalse(model.equals("Hello")); + assertFalse(model.equals((Object)"Hello")); assertFalse(model.equals(new AxEngineModel(new AxArtifactKey()))); assertFalse(model.equals(new AxEngineModel(new AxArtifactKey(), new AxContextSchemas(schemasKey), new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats))); 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 86a8c4763..c6fde1cdf 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,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -140,7 +141,7 @@ public class EngineStatsTest { assertTrue(stats.equals(stats)); assertTrue(stats.equals(clonedStats)); assertFalse(stats.equals(null)); - assertFalse(stats.equals("Hello")); + assertFalse(stats.equals((Object)"Hello")); assertFalse(stats.equals(new AxEngineStats(new AxReferenceKey()))); assertEquals(0, stats.compareTo(stats)); -- cgit 1.2.3-korg