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

Commit

Permalink
Remove some whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
centic9 committed Mar 21, 2024
1 parent 374411d commit 6b8660b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/main/java/hudson/plugins/jacoco/report/CoverageReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/**
* Root object of the coverage report.
*
*
* @author Kohsuke Kawaguchi
* @author Ognjen Bubalo
*/
Expand All @@ -44,7 +44,7 @@ private CoverageReport(JacocoBuildAction action) {
this.action = action;
setName("Jacoco");
}

// private String instructionColor;
// private String classColor;
// private String branchColor;
Expand All @@ -55,7 +55,7 @@ private CoverageReport(JacocoBuildAction action) {

/**
* Loads the exec files using JaCoCo API. Creates the reporting objects and the report tree.
*
*
* @param action Jacoco build action
* @param executionFileLoader execution file loader owning bundle coverage
*/
Expand Down Expand Up @@ -105,7 +105,7 @@ public CoverageReport(JacocoBuildAction action, @NonNull ExecutionFileLoader exe

/**
* From Jacoco: Checks if a class name is anonymous or not.
*
*
* @param vmname
* @return
*/
Expand All @@ -126,7 +126,7 @@ private boolean isAnonymous(final String vmname) {

/**
* Returns a method name for the method, including possible parameter names.
*
*
* @param classCov
* Coverage Information about the Class
* @param methodCov
Expand All @@ -142,14 +142,14 @@ private String getMethodName(IClassCoverage classCov, IMethodCoverage methodCov)
if (isAnonymous(classCov.getName())) {
return "{...}";
}

int pos = classCov.getName().lastIndexOf('/');
String name = pos == -1 ? classCov.getName() : classCov.getName().substring(pos + 1);
sb.append(name.replace('$', '.'));
} else {
sb.append(methodCov.getName());
}

sb.append('(');
final Type[] arguments = Type.getArgumentTypes(methodCov.getDesc());
boolean comma = false;
Expand All @@ -159,7 +159,7 @@ private String getMethodName(IClassCoverage classCov, IMethodCoverage methodCov)
} else {
comma = true;
}

String name = arg.getClassName();
int pos = name.lastIndexOf('.');
String shortname = pos == -1 ? name : name.substring(pos + 1);
Expand All @@ -172,12 +172,12 @@ private String getMethodName(IClassCoverage classCov, IMethodCoverage methodCov)

static final NumberFormat dataFormat = new DecimalFormat("000.00", new DecimalFormatSymbols(Locale.US));
static final NumberFormat percentFormat = new DecimalFormat("0.0", new DecimalFormatSymbols(Locale.US));

@Override
protected void printRatioCell(boolean failed, Coverage ratio, StringBuilder buf) {
if (ratio != null && ratio.isInitialized()) {
String bgColor = "#FFFFFF";

if (JacocoHealthReportThresholds.RESULT.BETWEENMINMAX == healthReports.getResultByTypeAndRatio(ratio)) {
bgColor = "#FF8000";
} else if (JacocoHealthReportThresholds.RESULT.BELOWMINIMUM == healthReports.getResultByTypeAndRatio(ratio)) {
Expand All @@ -190,7 +190,7 @@ protected void printRatioCell(boolean failed, Coverage ratio, StringBuilder buf)
buf.append("</td>\n");
}
}

@Override
protected void printRatioTable(Coverage ratio, StringBuilder buf){
buf.append("<table class='percentgraph' cellpadding='0' cellspacing='0'><tr class='percentgraph'>")
Expand All @@ -210,7 +210,7 @@ public CoverageReport getPreviousResult() {
if(prev!=null) {
return prev.getResult();
}

return null;
}

Expand All @@ -221,7 +221,7 @@ public Run<?,?> getBuild() {

/**
* Serves a single jacoco.exec file that merges all that have been recorded.
* @return HTTP response serving a single jacoco.exec file, or error 404 if nothing has been recorded.
* @return HTTP response serving a single jacoco.exec file, or error 404 if nothing has been recorded.
* @throws IOException if any I/O error occurs
*/
@WebMethod(name="jacoco.exec")
Expand Down

0 comments on commit 6b8660b

Please sign in to comment.