Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
SpotBugs violations
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Oct 9, 2024
1 parent 1a9c05f commit 05ab2d9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 30 deletions.
26 changes: 3 additions & 23 deletions src/main/java/hudson/plugins/jacoco/JacocoPublisher.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hudson.plugins.jacoco;

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.*;
import hudson.model.Result;
import hudson.model.AbstractBuild;
Expand Down Expand Up @@ -51,18 +50,18 @@ public class JacocoPublisher extends Recorder implements SimpleBuildStep {
* <p>
* TODO: define a configuration mechanism.

Check warning on line 51 in src/main/java/hudson/plugins/jacoco/JacocoPublisher.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: define a configuration mechanism.
*/
public Rule rule;
// public Rule rule;
@Deprecated
public transient String includes;
@Deprecated
public transient int moduleNum;
/**
* {@link hudson.model.HealthReport} thresholds to apply.
*/
public JacocoHealthReportThresholds healthReports;
private JacocoHealthReportThresholds healthReports;

// Delta coverage thresholds to apply
public JacocoHealthReportDeltaThresholds deltaHealthReport;
JacocoHealthReportDeltaThresholds deltaHealthReport;


/**
Expand Down Expand Up @@ -799,27 +798,8 @@ public BuildStepMonitor getRequiredMonitorService() {
return BuildStepMonitor.NONE;
}

@Override
public BuildStepDescriptor<Publisher> getDescriptor() {
return (BuildStepDescriptor<Publisher>)super.getDescriptor();
}

/**
* @deprecated
* use injection via {@link Jenkins#getInjector()}
*/
public static /*final*/ BuildStepDescriptor<Publisher> DESCRIPTOR;

private static void setDescriptor(BuildStepDescriptor<Publisher> descriptor) {
DESCRIPTOR = descriptor;
}

@Extension @Symbol("jacoco")
public static class DescriptorImpl extends BuildStepDescriptor<Publisher> {
public DescriptorImpl() {
super(JacocoPublisher.class);
setDescriptor(this);
}

@NonNull
@Override
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/hudson/plugins/jacoco/model/CoverageObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ public abstract class CoverageObject<SELF extends CoverageObject<SELF>> {
/**
* Variables used to store which child has to highest coverage for each coverage type.
*/
public int maxClazz=1;
public int maxMethod=1;
public int maxLine=1;
public int maxComplexity=1;
public int maxInstruction=1;
public int maxBranch=1;
private int maxClazz=1;
private int maxMethod=1;
private int maxLine=1;
private int maxComplexity=1;
private int maxInstruction=1;
private int maxBranch=1;

private volatile boolean failed = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private CoverageReport(JacocoBuildAction action) {
// private String complexityColor;
// private String lineColor;
// private String methodColor;
public JacocoHealthReportThresholds healthReports;
private JacocoHealthReportThresholds healthReports;

/**
* Loads the exec files using JaCoCo API. Creates the reporting objects and the report tree.
Expand Down

0 comments on commit 05ab2d9

Please sign in to comment.