diff options
author | Artur Signell <artur@vaadin.com> | 2013-06-28 16:31:48 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-06-28 13:34:13 +0000 |
commit | 170205908d72e51ba447daabbc8b2323c119a97e (patch) | |
tree | 1e5ca1a3828ed90fe5d3208cec57f147424d1e0b /server/src/com/vaadin/ui | |
parent | 7e7e698367d38d10cb05cf493bd0eee338b05c0c (diff) | |
download | vaadin-framework-170205908d72e51ba447daabbc8b2323c119a97e.tar.gz vaadin-framework-170205908d72e51ba447daabbc8b2323c119a97e.zip |
Replace printStackTrace with getLogger().log() (#12147)
Change-Id: I9ec61fdc7ddc06f129a9d69b99e6295a62c4b0d3
Diffstat (limited to 'server/src/com/vaadin/ui')
-rw-r--r-- | server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java index b1eef16024..9774211bea 100644 --- a/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java +++ b/server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java @@ -22,6 +22,8 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.Property.ValueChangeListener; @@ -567,7 +569,10 @@ public class ColorPickerPopup extends Window implements ClickListener, blueSlider.setValue(((Integer) color.getBlue()).doubleValue()); greenSlider.setValue(((Integer) color.getGreen()).doubleValue()); } catch (ValueOutOfBoundsException e) { - e.printStackTrace(); + getLogger().log( + Level.WARNING, + "Unable to set RGB color value to " + color.getRed() + "," + + color.getGreen() + "," + color.getBlue(), e); } } @@ -577,7 +582,10 @@ public class ColorPickerPopup extends Window implements ClickListener, saturationSlider.setValue(((Float) (hsv[1] * 100f)).doubleValue()); valueSlider.setValue(((Float) (hsv[2] * 100f)).doubleValue()); } catch (ValueOutOfBoundsException e) { - e.printStackTrace(); + getLogger().log( + Level.WARNING, + "Unable to set HSV color value to " + hsv[0] + "," + hsv[1] + + "," + hsv[2], e); } } @@ -764,4 +772,8 @@ public class ColorPickerPopup extends Window implements ClickListener, return color; } }; + + public static Logger getLogger() { + return Logger.getLogger(ColorPickerPopup.class.getName()); + } }
\ No newline at end of file |