Mercurial > dive4elements > river
changeset 8150:fe67edde6189
Do not put metadata on series if there are none (avoid NPE).
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 28 Aug 2014 15:34:57 +0200 |
parents | 969963ee61ba |
children | a709e6334c4a |
files | artifacts/src/main/java/org/dive4elements/river/exports/process/BedWidthProcessor.java |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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) {