Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>5.9</version>
<version>5.12</version>
<relativePath />
</parent>

Expand All @@ -29,7 +29,7 @@
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
<jenkins.baseline>2.479</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
<spotless.check.skip>false</spotless.check.skip>
<spotless.check.skip>true</spotless.check.skip>
</properties>

<dependencyManagement>
Expand Down
14 changes: 4 additions & 10 deletions src/main/java/hudson/plugins/plot/CSVSeries.java
Original file line number Diff line number Diff line change
Expand Up @@ -280,18 +280,12 @@

boolean retVal =
switch (inclusionFlag) {
case INCLUDE_BY_STRING ->
// if the set contains it, don't exclude it.
!checkExclusionSet(label);
case EXCLUDE_BY_STRING ->
// if the set doesn't contain it, exclude it.
checkExclusionSet(label);
case INCLUDE_BY_STRING -> !checkExclusionSet(label); // if the set contains it, don't exclude it.
case EXCLUDE_BY_STRING -> checkExclusionSet(label); // if the set doesn't contain it, exclude it.
case INCLUDE_BY_COLUMN ->
// if the set contains it, don't exclude it.
!(colExclusionSet.contains(index));
!(colExclusionSet.contains(index)); // if the set contains it, don't exclude it.
case EXCLUDE_BY_COLUMN ->
// if the set doesn't contain it, don't exclude it.
colExclusionSet.contains(index);
colExclusionSet.contains(index); // if the set doesn't contain it, don't exclude it.

Check warning on line 288 in src/main/java/hudson/plugins/plot/CSVSeries.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 286-288 are not covered by tests
default -> false;
};

Expand Down
55 changes: 33 additions & 22 deletions src/main/java/hudson/plugins/plot/Plot.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
package hudson.plugins.plot;

import static org.jfree.chart.plot.PlotOrientation.VERTICAL;

import com.opencsv.CSVReader;
import com.opencsv.CSVWriter;
import com.opencsv.exceptions.CsvValidationException;
Expand Down Expand Up @@ -49,7 +51,6 @@
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.DefaultDrawingSupplier;
import org.jfree.chart.plot.DrawingSupplier;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.renderer.category.AbstractCategoryItemRenderer;
import org.jfree.chart.renderer.category.LineAndShapeRenderer;
import org.kohsuke.stapler.DataBoundConstructor;
Expand Down Expand Up @@ -417,7 +418,7 @@
} catch (NumberFormatException nfe) {
LOGGER.log(
Level.INFO,
"Failed to parse Double value from String." + " Not a problem, result already set",
"Failed to parse double from '" + input + "'. Not a problem, result already set",
nfe);
}
}
Expand Down Expand Up @@ -896,26 +897,36 @@
*/
private JFreeChart createChart(PlotCategoryDataset dataset) {
return switch (ChartStyle.forName(getUrlStyle())) {
case AREA -> ChartFactory.createAreaChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case BAR -> ChartFactory.createBarChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case BAR_3D -> ChartFactory.createBarChart3D(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case LINE_3D -> ChartFactory.createLineChart3D(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case LINE_SIMPLE -> ChartFactory.createLineChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case STACKED_AREA -> ChartFactory.createStackedAreaChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case STACKED_BAR -> ChartFactory.createStackedBarChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case STACKED_BAR_3D -> ChartFactory.createStackedBarChart3D(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case WATERFALL -> ChartFactory.createWaterfallChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
default -> ChartFactory.createLineChart(
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
case AREA ->
ChartFactory.createAreaChart(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
case BAR ->
ChartFactory.createBarChart(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
case BAR_3D ->
ChartFactory.createBarChart3D(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
case LINE_3D ->
ChartFactory.createLineChart3D(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
case LINE_SIMPLE ->
ChartFactory.createLineChart(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
case STACKED_AREA ->
ChartFactory.createStackedAreaChart(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
case STACKED_BAR ->
ChartFactory.createStackedBarChart(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
case STACKED_BAR_3D ->
ChartFactory.createStackedBarChart3D(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
case WATERFALL ->
ChartFactory.createWaterfallChart(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
default ->
ChartFactory.createLineChart(
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);

Check warning on line 929 in src/main/java/hudson/plugins/plot/Plot.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 901-929 are not covered by tests
};
}

Expand Down