changeset 348:ec95d3248576

Included case, that there is no start or end date while creating subtitles of horizontalprofile charts. gnv-artifacts/trunk@418 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 11 Dec 2009 11:18:21 +0000
parents 2f84ac484d8c
children 555483213f78
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Fri Dec 11 10:41:24 2009 +0000
+++ b/gnv-artifacts/ChangeLog	Fri Dec 11 11:18:21 2009 +0000
@@ -1,3 +1,9 @@
+2009-12-11  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	* src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java:
+	  Exception handling while creating subtitle of horizontalprofile charts.
+	  Included the case, that there is no start and no end date.
+
 2009-12-11	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/test/java/de/intevation/gnv/artifacts/TimeSeriesPointTimeSeriesTestCase.java,
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java	Fri Dec 11 10:41:24 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java	Fri Dec 11 11:18:21 2009 +0000
@@ -277,7 +277,11 @@
             }
         }
 
-        subTitle = format.format(startDate) + " - " + format.format(endDate);
+        if (startDate != null && endDate != null)
+            subTitle = format.format(startDate)+" - "+format.format(endDate);
+
+        subTitle = subTitle == null ? "" : subTitle;
+
         log.debug("created title for horizontal profile chart: " + subTitle);
 
         return subTitle;

http://dive4elements.wald.intevation.org