# HG changeset patch # User Tim Englich # Date 1255954008 0 # Node ID 34f233123a6f94a54bfd2215bfd61fd23570fa76 # Parent 17987acf20d0f42d4ca62483921dcc20767254bb Adding empty Series into Chart to prevent NPE issue 19 gnv-artifacts/trunk@243 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 17987acf20d0 -r 34f233123a6f gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Mon Oct 19 10:25:54 2009 +0000 +++ b/gnv-artifacts/ChangeLog Mon Oct 19 12:06:48 2009 +0000 @@ -1,5 +1,10 @@ 2009-10-19 Tim Englich + * src/main/java/de/intevation/gnv/chart/ChartFactory.java (createDataset), + src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java (createDataset): + Adding empty Series into Chart to prevent NPE issue 19 + +2009-10-19 Tim Englich * src/main/java/de/intevation/gnv/transition/TransitionBase.java (putInputData): Correct misspelled Exception-Message as an Result of fixing issue35 diff -r 17987acf20d0 -r 34f233123a6f gnv-artifacts/src/main/java/de/intevation/gnv/chart/ChartFactory.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/ChartFactory.java Mon Oct 19 10:25:54 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/ChartFactory.java Mon Oct 19 12:06:48 2009 +0000 @@ -368,6 +368,10 @@ lTimeSeriesCollection.addSeries(createTimeSeries( mTimeSeriesName, resultSet, lUpperCut, lLowerCut, mStart, mEnd, dStart, dEnd)); + }else{ + lTimeSeriesCollection.addSeries(createTimeSeries( + "", resultSet, lUpperCut, lLowerCut, + mStart, mEnd, dStart, dEnd)); } } catch (Exception e) { sLogger.error(e.getMessage(), e); diff -r 17987acf20d0 -r 34f233123a6f gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java Mon Oct 19 10:25:54 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java Mon Oct 19 12:06:48 2009 +0000 @@ -298,6 +298,9 @@ + "von Datensätzen " + mStart + " / " + mEnd); xyDataset.addSeries(createXYSeries(seriesName, resultSet, lUpperCut, lLowerCut, mStart, mEnd)); + }else{ + xyDataset.addSeries(createXYSeries("", + resultSet, lUpperCut, lLowerCut, mStart, mEnd)); } } catch (Exception e) { sLogger.error(e.getMessage(), e);