From f4580fa8a931c84b36d59e2ef853d1fba3d5917e Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 27 Aug 2021 15:24:06 -0400 Subject: Fix sonars in apex-pdp #2 plugins-events thru plugins-persistence-jpa-eclipselink Fixed: - use "var" - disambiguate method parameter types - rename parameter Issue-ID: POLICY-3093 Change-Id: Ife5897015be495403e731754d5862b803a217c87 Signed-off-by: Jim Hahn --- .../apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java | 3 ++- .../org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java | 3 ++- .../policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins/plugins-executor/plugins-executor-jruby/src') diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java index ee172d3ed..10d93e558 100644 --- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java +++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2019 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. @@ -89,7 +90,7 @@ public class JrubyStateFinalizerExecutor extends StateFinalizerExecutor { container.put("executor", getExecutionContext()); /* Precompiled version */ - boolean returnValue = false; + var returnValue = false; final IRubyObject ret = parsedjruby.run(); if (ret != null) { final Boolean retbool = ret.toJava(java.lang.Boolean.class); diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java index aa5700433..f54c2d72c 100644 --- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java +++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java @@ -3,6 +3,7 @@ * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. * Modifications Copyright (C) 2021 Bell Canada. All rights reserved. + * 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. @@ -90,7 +91,7 @@ public class JrubyTaskExecutor extends TaskExecutor { container.put("executor", getExecutionContext()); /* Precompiled version */ - boolean returnValue = false; + var returnValue = false; final IRubyObject ret = parsedjruby.run(); if (ret != null) { final Boolean retbool = ret.toJava(java.lang.Boolean.class); diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java index 97419b0c1..5f2167144 100644 --- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java +++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2019 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. @@ -93,7 +94,7 @@ public class JrubyTaskSelectExecutor extends TaskSelectExecutor { container.put("executor", getExecutionContext()); /* Precompiled version */ - boolean returnValue = false; + var returnValue = false; final IRubyObject ret = parsedjruby.run(); if (ret != null) { final Boolean retbool = ret.toJava(java.lang.Boolean.class); -- cgit 1.2.3-korg