From 952d4f5aab9913f961e77fa0457da5d38f31d94f Mon Sep 17 00:00:00 2001 From: liamfallon Date: Sun, 16 Sep 2018 02:03:12 +0100 Subject: Fix Sonar issues in apex Fixing various Sonar issues in apex. Issue-ID: POLICY-1034 Change-Id: Ie693637d75bd7e38c71b7ba04886fb75636276ed Signed-off-by: liamfallon --- .../policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java | 2 +- .../org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java | 2 +- .../policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/plugins-executor/plugins-executor-jruby') 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 9e9024401..aaccbebab 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 @@ -89,7 +89,7 @@ public class JrubyStateFinalizerExecutor extends StateFinalizerExecutor { boolean returnValue = false; final IRubyObject ret = parsedjruby.run(); if (ret != null) { - final Boolean retbool = (Boolean) ret.toJava(java.lang.Boolean.class); + final Boolean retbool = ret.toJava(java.lang.Boolean.class); if (retbool != null) { returnValue = true; } 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 d49423486..8019259bd 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 @@ -89,7 +89,7 @@ public class JrubyTaskExecutor extends TaskExecutor { boolean returnValue = false; final IRubyObject ret = parsedjruby.run(); if (ret != null) { - final Boolean retbool = (Boolean) ret.toJava(java.lang.Boolean.class); + final Boolean retbool = ret.toJava(java.lang.Boolean.class); if (retbool != null) { returnValue = true; } 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 b3ce7e0fd..0e239f7bc 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 @@ -90,7 +90,7 @@ public class JrubyTaskSelectExecutor extends TaskSelectExecutor { boolean returnValue = false; final IRubyObject ret = parsedjruby.run(); if (ret != null) { - final Boolean retbool = (Boolean) ret.toJava(java.lang.Boolean.class); + final Boolean retbool = ret.toJava(java.lang.Boolean.class); if (retbool != null) { returnValue = true; } -- cgit 1.2.3-korg