From fcc52b84fb43acf1b68dfd48d135cde996c68a09 Mon Sep 17 00:00:00 2001 From: Faisal Hameed Date: Tue, 23 Feb 2016 11:39:31 +0500 Subject: [PATCH] Fixing squid:S1481, squid:S1068, squid:S1488 --- .../com/sonyericsson/jenkins/plugins/bfa/CauseManagement.java | 3 --- .../jenkins/plugins/bfa/graphs/TimeSeriesChart.java | 4 +--- .../jenkins/plugins/bfa/model/FailureCauseColumn.java | 3 +-- .../jenkins/plugins/bfa/model/dbf/BuildFlowDBF.java | 3 --- .../jenkins/plugins/bfa/sod/ScanOnDemandTask.java | 1 - 5 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/CauseManagement.java b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/CauseManagement.java index 33dd2843..6553cbd6 100644 --- a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/CauseManagement.java +++ b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/CauseManagement.java @@ -54,7 +54,6 @@ import java.util.Calendar; import java.util.Date; import java.util.Map; -import java.util.logging.Logger; /** * Page for managing the failure causes. @@ -64,8 +63,6 @@ @Extension public class CauseManagement extends BfaGraphAction { - private static final Logger logger = Logger.getLogger(CauseManagement.class.getName()); - /** * Where in the Jenkins name space this action will be. * diff --git a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/graphs/TimeSeriesChart.java b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/graphs/TimeSeriesChart.java index 0c60c9cd..77704ccf 100644 --- a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/graphs/TimeSeriesChart.java +++ b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/graphs/TimeSeriesChart.java @@ -153,9 +153,7 @@ public int compare(FailureCauseTimeInterval o1, FailureCauseTimeInterval o2) { plot.setRangeAxis(yAxis); - JFreeChart chart = new JFreeChart(graphTitle, JFreeChart.DEFAULT_TITLE_FONT, plot, true); - - return chart; + return new JFreeChart(graphTitle, JFreeChart.DEFAULT_TITLE_FONT, plot, true); } /** diff --git a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseColumn.java b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseColumn.java index e3bdc5e1..407ecd8b 100644 --- a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseColumn.java +++ b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseColumn.java @@ -119,8 +119,7 @@ private FailureCauseBuildAction findFailureCauseBuildAction(Job job) { if (lastBuild == null) { return null; } - FailureCauseBuildAction action = lastBuild.getAction(FailureCauseBuildAction.class); - return action; + return lastBuild.getAction(FailureCauseBuildAction.class); } } diff --git a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/dbf/BuildFlowDBF.java b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/dbf/BuildFlowDBF.java index 3151a567..d5703a21 100644 --- a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/dbf/BuildFlowDBF.java +++ b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/dbf/BuildFlowDBF.java @@ -32,7 +32,6 @@ import java.util.Set; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; -import java.util.logging.Logger; /** @@ -43,8 +42,6 @@ @Extension public class BuildFlowDBF extends DownstreamBuildFinder { - private static final Logger logger = Logger. - getLogger(BuildFlowDBF.class.getName()); @Override public List> getDownstreamBuilds( final AbstractBuild build) { diff --git a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/sod/ScanOnDemandTask.java b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/sod/ScanOnDemandTask.java index 4b6e0ce7..b14393d8 100644 --- a/src/main/java/com/sonyericsson/jenkins/plugins/bfa/sod/ScanOnDemandTask.java +++ b/src/main/java/com/sonyericsson/jenkins/plugins/bfa/sod/ScanOnDemandTask.java @@ -90,7 +90,6 @@ public void run() { public void endMatrixBuildScan() throws IOException { List runs = ((MatrixBuild)build).getRuns(); List runsWithCorrectNumber = new LinkedList(); - int i = 0; for (MatrixRun run : runs) { if (run.getNumber() == build.getNumber()) { runsWithCorrectNumber.add(run);