changeset 1003:fa6dd67f61a5

RT-21136: EffectConverter convert method should not be called. If it is, that means the parsed value is not a dropshadow or an innershadow, so throw an IllegalArgumentException
author David Grieve<david.grieve@oracle.com>
date Mon, 14 May 2012 10:28:21 -0400
parents 8a0747a8ce6d
children 7390ad3a0a74
files javafx-ui-common/src/com/sun/javafx/css/converters/EffectConverter.java
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/com/sun/javafx/css/converters/EffectConverter.java	Mon May 14 13:59:03 2012 +0100
+++ b/javafx-ui-common/src/com/sun/javafx/css/converters/EffectConverter.java	Mon May 14 10:28:21 2012 -0400
@@ -24,6 +24,7 @@
  */
 package com.sun.javafx.css.converters;
 
+import com.sun.javafx.Logging;
 import javafx.scene.effect.BlurType;
 import javafx.scene.effect.DropShadow;
 import javafx.scene.effect.Effect;
@@ -34,6 +35,8 @@
 import com.sun.javafx.css.Size;
 import com.sun.javafx.css.StyleConverter;
 import com.sun.javafx.css.ParsedValue;
+import com.sun.javafx.css.StyleManager;
+import com.sun.javafx.logging.PlatformLogger;
 
 public class EffectConverter extends StyleConverter<ParsedValue[], Effect> {
 
@@ -50,6 +53,11 @@
     public static EffectConverter getInstance() {
         return Holder.EFFECT_CONVERTER;
     }
+    
+    @Override
+    public Effect convert(ParsedValue<ParsedValue[], Effect> value, Font font) {
+        throw new IllegalArgumentException("Parsed value is not an Effect");
+    }    
 
     protected EffectConverter() {
         super();