diff options
author | liamfallon <liam.fallon@est.tech> | 2019-06-27 14:58:28 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-06-27 14:58:28 +0000 |
commit | fad6fa4890538fe8f4cbb96ae3fb0be6767d28d1 (patch) | |
tree | 34ef945b70297b5bd2171cf84d8b3c700a704830 /model/basic-model/src | |
parent | 5f029543f1e673655af2d2974113069df0b6def0 (diff) |
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 <liam.fallon@est.tech>
Diffstat (limited to 'model/basic-model/src')
4 files changed, 12 insertions, 8 deletions
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java index b00be2fd1..ee14a0606 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java @@ -1,19 +1,20 @@ /* * ============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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ @@ -65,7 +66,7 @@ public class AxKeyInfoTest { assertTrue(testKeyInfo.equals(testKeyInfo)); assertTrue(testKeyInfo.equals(clonedReferenceKey)); assertFalse(testKeyInfo.equals(null)); - assertFalse(testKeyInfo.equals(new AxArtifactKey())); + assertFalse(testKeyInfo.equals((Object)new AxArtifactKey())); assertFalse(testKeyInfo.equals(new AxKeyInfo(new AxArtifactKey()))); assertFalse(testKeyInfo.equals(new AxKeyInfo(key, UUID.randomUUID(), "Some Description"))); assertFalse(testKeyInfo.equals(new AxKeyInfo(key, uuid, "Some Description"))); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java index a1d272775..061df61a5 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.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. @@ -67,7 +68,7 @@ public class AxKeyUseTest { assertTrue(keyUse.equals(keyUse)); assertTrue(keyUse.equals(clonedKeyUse)); - assertFalse(keyUse.equals("Hello")); + assertFalse(keyUse.equals((Object)"Hello")); assertTrue(keyUse.equals(new AxKeyUse(key))); assertEquals(0, keyUse.compareTo(keyUse)); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java index 27726a9b4..2745b95ac 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.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. @@ -92,7 +93,7 @@ public class AxReferenceKeyTest { assertTrue(testReferenceKey.equals(testReferenceKey)); assertTrue(testReferenceKey.equals(clonedReferenceKey)); - assertFalse(testReferenceKey.equals("Hello")); + assertFalse(testReferenceKey.equals((Object)"Hello")); assertFalse(testReferenceKey.equals(new AxReferenceKey("PKN", "0.0.2", "PLN", "LN"))); assertFalse(testReferenceKey.equals(new AxReferenceKey("NPKN", "0.0.2", "PLN", "LN"))); assertFalse(testReferenceKey.equals(new AxReferenceKey("NPKN", "0.0.1", "PLN", "LN"))); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java index 6ca94ddc8..af0ef5f3c 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.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. @@ -73,7 +74,7 @@ public class SupportApexBasicModelConceptsTester { assertTrue(model.equals(model)); assertTrue(model.equals(clonedModel)); assertFalse(model.equals(null)); - assertFalse(model.equals("Hello")); + assertFalse(model.equals((Object)"Hello")); clonedModel.getKey().setVersion("0.0.2"); assertFalse(model.equals(clonedModel)); clonedModel.getKey().setVersion("0.0.1"); @@ -95,7 +96,7 @@ public class SupportApexBasicModelConceptsTester { final AxKeyInformation clonedKeyI = new AxKeyInformation(keyI); assertFalse(keyI.equals(null)); - assertFalse(keyI.equals(new AxArtifactKey())); + assertFalse(keyI.equals((Object)new AxArtifactKey())); assertTrue(keyI.equals(clonedKeyI)); clonedKeyI.setKey(new AxArtifactKey()); |