changeset 3241:da3e58694cae

Prevent wrong cast. flys-artifacts/trunk@4873 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 04 Jul 2012 06:54:39 +0000
parents e3c70271d50f
children 1dca41dba135
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jul 04 06:52:21 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jul 04 06:54:39 2012 +0000
@@ -1,3 +1,8 @@
+2012-07-04	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java:
+	  Prevent casting exception.
+
 2012-07-04	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	issue487 (wrong area calculation).
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Wed Jul 04 06:52:21 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/EnhancedLineAndShapeRenderer.java	Wed Jul 04 06:54:39 2012 +0000
@@ -284,7 +284,7 @@
         }
 
         // Draw label of line.
-        if (isShowLineLabel(series) && isMinimumX (dataset, series, item)) {
+        if (dataset instanceof XYSeriesCollection && isShowLineLabel(series) && isMinimumX (dataset, series, item)) {
             XYSeries xYSeries = ((XYSeriesCollection) dataset).getSeries(series);
             String waterlevelLabel = (xYSeries instanceof HasLabel)
                 ? ((HasLabel)xYSeries).getLabel()

http://dive4elements.wald.intevation.org