diff options
author | Jim Hahn <jrh3@att.com> | 2021-05-10 12:52:21 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-05-10 12:53:22 -0400 |
commit | cc035870af8fa909fc19774f0b9382cf00e051a8 (patch) | |
tree | a382cf847fe38a7e0c8e049b702eee22b6a54f80 /gui-editors/gui-editor-apex/src/test | |
parent | bb9489515b7a4bcbfc3e28407ec5f4f1fc4df6bb (diff) |
Fix sonars in policy-gui
Fixed:
- use "var"
Only fixed the ones I saw visually, as SonarLint wouldn't run -
something about missing node.js.
Issue-ID: POLICY-3094
Change-Id: I594d424b42ce446d86724d75b1dd9ec868c14f2b
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'gui-editors/gui-editor-apex/src/test')
2 files changed, 8 insertions, 6 deletions
diff --git a/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/ApexEditorStartupTest.java b/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/ApexEditorStartupTest.java index d78eba3..717da11 100644 --- a/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/ApexEditorStartupTest.java +++ b/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/ApexEditorStartupTest.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -334,15 +335,15 @@ public class ApexEditorStartupTest { */ private String runEditor(final String[] args) throws InterruptedException { ParameterService.clear(); - final ByteArrayOutputStream outBaStream = new ByteArrayOutputStream(); - final PrintStream outStream = new PrintStream(outBaStream); + final var outBaStream = new ByteArrayOutputStream(); + final var outStream = new PrintStream(outBaStream); - final ApexEditorMain editorMain = new ApexEditorMain(args, outStream); + final var editorMain = new ApexEditorMain(args, outStream); // This test must be started in a thread because we want to intercept the output // in cases where the editor is // started infinitely - final Runnable testThread = new Runnable() { + final var testThread = new Runnable() { @Override public void run() { editorMain.init(); diff --git a/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/RestInterfaceTest.java b/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/RestInterfaceTest.java index cf1c4fa..3506dab 100644 --- a/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/RestInterfaceTest.java +++ b/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/RestInterfaceTest.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,10 +77,10 @@ public class RestInterfaceTest { // Start the editor editorMain = new ApexEditorMain(EDITOR_MAIN_ARGS, System.out); // prevent a stray stdin value from killing the editor - final ByteArrayInputStream input = new ByteArrayInputStream("".getBytes()); + final var input = new ByteArrayInputStream("".getBytes()); System.setIn(input); // Init the editor in a separate thread - final Runnable testThread = new Runnable() { + final var testThread = new Runnable() { @Override public void run() { editorMain.init(); |