From 35840d835f581c2d61de1c57fe9963e36eb15c9f Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 25 Feb 2020 16:10:08 +0000 Subject: 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 --- .../editor/rest/handling/ApexEditorRestResourceTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'client') diff --git a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/ApexEditorRestResourceTest.java b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/ApexEditorRestResourceTest.java index 7f19a3a63..346376d22 100644 --- a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/ApexEditorRestResourceTest.java +++ b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/ApexEditorRestResourceTest.java @@ -39,7 +39,7 @@ import org.onap.policy.common.utils.resources.TextFileUtils; /** * Test Apex Editor Rest Resource. - * + * * @author Liam Fallon (liam.fallon@ericsson.com) */ public class ApexEditorRestResourceTest extends JerseyTest { @@ -55,7 +55,7 @@ public class ApexEditorRestResourceTest extends JerseyTest { result = target("editor/-1/Session/Create").request().get(ApexApiResult.class); assertEquals(Result.SUCCESS, result.getResult()); - final int sessionId = new Integer(result.getMessages().get(0)); + final int sessionId = Integer.valueOf(result.getMessages().get(0)); result = target("editor/-1/Session/Create").request().get(ApexApiResult.class); assertEquals(Result.SUCCESS, result.getResult()); @@ -191,7 +191,7 @@ public class ApexEditorRestResourceTest extends JerseyTest { public void testContextSchema() throws IOException { ApexApiResult result = target("editor/-1/Session/Create").request().get(ApexApiResult.class); assertEquals(Result.SUCCESS, result.getResult()); - final int sessionId = new Integer(result.getMessages().get(0)); + final int sessionId = Integer.valueOf(result.getMessages().get(0)); final int corruptSessionId = ApexEditorRestResource.createCorruptSession(); @@ -327,7 +327,7 @@ public class ApexEditorRestResourceTest extends JerseyTest { public void testContextAlbum() throws IOException { ApexApiResult result = target("editor/-1/Session/Create").request().get(ApexApiResult.class); assertEquals(Result.SUCCESS, result.getResult()); - final int sessionId = new Integer(result.getMessages().get(0)); + final int sessionId = Integer.valueOf(result.getMessages().get(0)); final int corruptSessionId = ApexEditorRestResource.createCorruptSession(); result = target("editor/-12345/Validate/ContextAlbum").request().get(ApexApiResult.class); @@ -458,7 +458,7 @@ public class ApexEditorRestResourceTest extends JerseyTest { ApexApiResult result = target("editor/-1/Session/Create").request().get(ApexApiResult.class); assertEquals(Result.SUCCESS, result.getResult()); - final int sessionId = new Integer(result.getMessages().get(0)); + final int sessionId = Integer.valueOf(result.getMessages().get(0)); result = target("editor/-12345/Validate/Event").request().get(ApexApiResult.class); assertEquals(ApexApiResult.Result.FAILED, result.getResult()); @@ -653,7 +653,7 @@ public class ApexEditorRestResourceTest extends JerseyTest { ApexApiResult result = target("editor/-1/Session/Create").request().get(ApexApiResult.class); assertEquals(Result.SUCCESS, result.getResult()); - final int sessionId = new Integer(result.getMessages().get(0)); + final int sessionId = Integer.valueOf(result.getMessages().get(0)); result = target("editor/-12345/Validate/Task").request().get(ApexApiResult.class); assertEquals(ApexApiResult.Result.FAILED, result.getResult()); @@ -978,7 +978,7 @@ public class ApexEditorRestResourceTest extends JerseyTest { ApexApiResult result = target("editor/-1/Session/Create").request().get(ApexApiResult.class); assertEquals(Result.SUCCESS, result.getResult()); - final int sessionId = new Integer(result.getMessages().get(0)); + final int sessionId = Integer.valueOf(result.getMessages().get(0)); result = target("editor/-12345/Model/Validate").request().get(ApexApiResult.class); assertEquals(ApexApiResult.Result.FAILED, result.getResult()); -- cgit 1.2.3-korg