Skip to content

Commit 36e201d

Browse files
Bump org.jenkins-ci.plugins:plugin from 5.9 to 5.12 (#175)
* Bump org.jenkins-ci.plugins:plugin from 5.9 to 5.12 Bumps [org.jenkins-ci.plugins:plugin](https://github.com/jenkinsci/plugin-pom) from 5.9 to 5.12. - [Release notes](https://github.com/jenkinsci/plugin-pom/releases) - [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md) - [Commits](jenkinsci/plugin-pom@plugin-5.9...plugin-5.12) --- updated-dependencies: - dependency-name: org.jenkins-ci.plugins:plugin dependency-version: '5.12' dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Format with spotless --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
1 parent dd811dc commit 36e201d

3 files changed

Lines changed: 39 additions & 34 deletions

File tree

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.jenkins-ci.plugins</groupId>
77
<artifactId>plugin</artifactId>
8-
<version>5.9</version>
8+
<version>5.12</version>
99
<relativePath />
1010
</parent>
1111

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

3535
<dependencyManagement>

src/main/java/hudson/plugins/plot/CSVSeries.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,12 @@ private boolean excludePoint(final String label, int index) {
280280

281281
boolean retVal =
282282
switch (inclusionFlag) {
283-
case INCLUDE_BY_STRING ->
284-
// if the set contains it, don't exclude it.
285-
!checkExclusionSet(label);
286-
case EXCLUDE_BY_STRING ->
287-
// if the set doesn't contain it, exclude it.
288-
checkExclusionSet(label);
283+
case INCLUDE_BY_STRING -> !checkExclusionSet(label); // if the set contains it, don't exclude it.
284+
case EXCLUDE_BY_STRING -> checkExclusionSet(label); // if the set doesn't contain it, exclude it.
289285
case INCLUDE_BY_COLUMN ->
290-
// if the set contains it, don't exclude it.
291-
!(colExclusionSet.contains(index));
286+
!(colExclusionSet.contains(index)); // if the set contains it, don't exclude it.
292287
case EXCLUDE_BY_COLUMN ->
293-
// if the set doesn't contain it, don't exclude it.
294-
colExclusionSet.contains(index);
288+
colExclusionSet.contains(index); // if the set doesn't contain it, don't exclude it.
295289
default -> false;
296290
};
297291

src/main/java/hudson/plugins/plot/Plot.java

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
package hudson.plugins.plot;
77

8+
import static org.jfree.chart.plot.PlotOrientation.VERTICAL;
9+
810
import com.opencsv.CSVReader;
911
import com.opencsv.CSVWriter;
1012
import com.opencsv.exceptions.CsvValidationException;
@@ -49,7 +51,6 @@
4951
import org.jfree.chart.plot.CategoryPlot;
5052
import org.jfree.chart.plot.DefaultDrawingSupplier;
5153
import org.jfree.chart.plot.DrawingSupplier;
52-
import org.jfree.chart.plot.PlotOrientation;
5354
import org.jfree.chart.renderer.category.AbstractCategoryItemRenderer;
5455
import org.jfree.chart.renderer.category.LineAndShapeRenderer;
5556
import org.kohsuke.stapler.DataBoundConstructor;
@@ -417,7 +418,7 @@ public Double getDoubleFromString(String input) {
417418
} catch (NumberFormatException nfe) {
418419
LOGGER.log(
419420
Level.INFO,
420-
"Failed to parse Double value from String." + " Not a problem, result already set",
421+
"Failed to parse double from '" + input + "'. Not a problem, result already set",
421422
nfe);
422423
}
423424
}
@@ -896,26 +897,36 @@ private void generatePlot(boolean forceGenerate) {
896897
*/
897898
private JFreeChart createChart(PlotCategoryDataset dataset) {
898899
return switch (ChartStyle.forName(getUrlStyle())) {
899-
case AREA -> ChartFactory.createAreaChart(
900-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
901-
case BAR -> ChartFactory.createBarChart(
902-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
903-
case BAR_3D -> ChartFactory.createBarChart3D(
904-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
905-
case LINE_3D -> ChartFactory.createLineChart3D(
906-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
907-
case LINE_SIMPLE -> ChartFactory.createLineChart(
908-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
909-
case STACKED_AREA -> ChartFactory.createStackedAreaChart(
910-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
911-
case STACKED_BAR -> ChartFactory.createStackedBarChart(
912-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
913-
case STACKED_BAR_3D -> ChartFactory.createStackedBarChart3D(
914-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
915-
case WATERFALL -> ChartFactory.createWaterfallChart(
916-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
917-
default -> ChartFactory.createLineChart(
918-
getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false);
900+
case AREA ->
901+
ChartFactory.createAreaChart(
902+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
903+
case BAR ->
904+
ChartFactory.createBarChart(
905+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
906+
case BAR_3D ->
907+
ChartFactory.createBarChart3D(
908+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
909+
case LINE_3D ->
910+
ChartFactory.createLineChart3D(
911+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
912+
case LINE_SIMPLE ->
913+
ChartFactory.createLineChart(
914+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
915+
case STACKED_AREA ->
916+
ChartFactory.createStackedAreaChart(
917+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
918+
case STACKED_BAR ->
919+
ChartFactory.createStackedBarChart(
920+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
921+
case STACKED_BAR_3D ->
922+
ChartFactory.createStackedBarChart3D(
923+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
924+
case WATERFALL ->
925+
ChartFactory.createWaterfallChart(
926+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
927+
default ->
928+
ChartFactory.createLineChart(
929+
getURLTitle(), null, getYaxis(), dataset, VERTICAL, hasLegend(), true, false);
919930
};
920931
}
921932

0 commit comments

Comments
 (0)