summaryrefslogtreecommitdiffstats
path: root/server/src/com
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-06-28 16:31:48 +0300
committerVaadin Code Review <review@vaadin.com>2013-06-28 13:34:13 +0000
commit170205908d72e51ba447daabbc8b2323c119a97e (patch)
tree1e5ca1a3828ed90fe5d3208cec57f147424d1e0b /server/src/com
parent7e7e698367d38d10cb05cf493bd0eee338b05c0c (diff)
downloadvaadin-framework-170205908d72e51ba447daabbc8b2323c119a97e.tar.gz
vaadin-framework-170205908d72e51ba447daabbc8b2323c119a97e.zip
Replace printStackTrace with getLogger().log() (#12147)
Change-Id: I9ec61fdc7ddc06f129a9d69b99e6295a62c4b0d3
Diffstat (limited to 'server/src/com')
-rw-r--r--server/src/com/vaadin/server/VaadinServlet.java2
-rw-r--r--server/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java8
-rw-r--r--server/src/com/vaadin/ui/components/colorpicker/ColorPickerPopup.java16
3 files changed, 22 insertions, 4 deletions
diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java
index a9eb42578e..94601d6599 100644
--- a/server/src/com/vaadin/server/VaadinServlet.java
+++ b/server/src/com/vaadin/server/VaadinServlet.java
@@ -814,7 +814,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
new Object[] { realFilename, filename });
scss.compile();
} catch (Exception e) {
- e.printStackTrace();
+ getLogger().log(Level.WARNING, "Scss compilation failed", e);
return false;
}
diff --git a/server/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java b/server/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java
index f199c347eb..94ca9e7d5b 100644
--- a/server/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java
+++ b/server/src/com/vaadin/server/themeutils/SASSAddonImportFileCreator.java
@@ -26,6 +26,8 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import com.vaadin.server.widgetsetutils.ClassPathExplorer;
import com.vaadin.server.widgetsetutils.ClassPathExplorer.LocationInfo;
@@ -126,10 +128,14 @@ public class SASSAddonImportFileCreator {
} catch (FileNotFoundException e) {
// Should not happen since file is checked before this
- e.printStackTrace();
+ getLogger().log(Level.WARNING, "Error updating addons.scss", e);
}
}
+ private static Logger getLogger() {
+ return Logger.getLogger(SASSAddonImportFileCreator.class.getName());
+ }
+
private static List<String> addImport(PrintStream stream, String file,
URL location) {
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