[PATCH] Do not put metadata on series if there are none (avoid NPE)
Wald Commits
scm-commit at wald.intevation.org
Thu Aug 28 15:35:01 CEST 2014
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1409232897 -7200
# Node ID fe67edde6189b6e68e4dbd2a5f8e296b71a2be2e
# Parent 969963ee61badbe0707850bf4094787c910bfa2b
Do not put metadata on series if there are none (avoid NPE).
diff -r 969963ee61ba -r fe67edde6189 artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java Thu Aug 28 12:00:52 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java Thu Aug 28 15:34:57 2014 +0200
@@ -46,8 +46,10 @@
Map<String, String> metaData = bundle.getFacet().getMetaData();
StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(),
theme);
- series.putMetaData(metaData, bundle.getArtifact(), context);
- yAxisLabel = metaData.get("Y");
+ if (!metaData.isEmpty()) {
+ series.putMetaData(metaData, bundle.getArtifact(), context);
+ yAxisLabel = metaData.get("Y");
+ }
Object data = bundle.getData(context);
if (data instanceof MorphologicWidth) {
More information about the Dive4Elements-commits
mailing list