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/event-model/src/test/java | |
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/event-model/src/test/java')
3 files changed, 7 insertions, 4 deletions
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java index 74f092a94..99d377261 100644 --- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java +++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.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. @@ -64,7 +65,7 @@ public class EventModelTest { assertTrue(model.equals(model)); assertTrue(model.equals(clonedModel)); - assertFalse(model.equals("Hello")); + assertFalse(model.equals((Object)"Hello")); assertFalse(model.equals(new AxEventModel(new AxArtifactKey()))); assertFalse(model.equals(new AxEventModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey)))); diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java index 4a17c2a48..b9b643e47 100644 --- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java +++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.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. @@ -194,7 +195,7 @@ public class EventsTest { assertTrue(event.equals(event)); assertTrue(event.equals(clonedEvent)); assertFalse(event.equals(null)); - assertFalse(event.equals("Hello")); + assertFalse(event.equals((Object)"Hello")); assertFalse( event.equals(new AxEvent(AxArtifactKey.getNullKey(), "namespace", "source", "target", parameterMap))); assertFalse(event.equals(new AxEvent(eventKey, "namespace1", "source", "target", parameterMap))); @@ -277,7 +278,7 @@ public class EventsTest { assertTrue(events.equals(events)); assertTrue(events.equals(clonedEvents)); assertFalse(events.equals(null)); - assertFalse(events.equals("Hello")); + assertFalse(events.equals((Object)"Hello")); assertFalse(events.equals(new AxEvents(new AxArtifactKey()))); assertEquals(0, events.compareTo(events)); diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java index 3d88b4c81..fe3c9e6b7 100644 --- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java +++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.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. @@ -117,7 +118,7 @@ public class FieldTest { assertTrue(field.equals(field)); assertTrue(field.equals(clonedField)); assertFalse(field.equals(null)); - assertFalse(field.equals("Hello")); + assertFalse(field.equals((Object)"Hello")); assertFalse(field.equals(new AxField(AxReferenceKey.getNullKey(), AxArtifactKey.getNullKey(), false))); assertFalse(field.equals(new AxField(fieldKey, AxArtifactKey.getNullKey(), false))); assertFalse(field.equals(new AxField(fieldKey, schemaKey, false))); |