summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-05-31 13:46:27 +0300
committerVaadin Code Review <review@vaadin.com>2013-05-31 12:08:49 +0000
commitcccff37c0c679515491a2cdd4244dbcd7e038629 (patch)
tree27f0a87dc6322fc99229d3c133668669f6a934a4 /server
parent36fd94ad9a72db9d2368ea08d69d636c00eea1c4 (diff)
downloadvaadin-framework-cccff37c0c679515491a2cdd4244dbcd7e038629.tar.gz
vaadin-framework-cccff37c0c679515491a2cdd4244dbcd7e038629.zip
Do not log legacy warnings in JUnit tests (#11963)
Change-Id: I5549a524d7fae32b1ef201073ab48cadcc4e8212
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/data/util/LegacyPropertyHelper.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/src/com/vaadin/data/util/LegacyPropertyHelper.java b/server/src/com/vaadin/data/util/LegacyPropertyHelper.java
index 3eb22524f8..551d7223d6 100644
--- a/server/src/com/vaadin/data/util/LegacyPropertyHelper.java
+++ b/server/src/com/vaadin/data/util/LegacyPropertyHelper.java
@@ -77,8 +77,8 @@ public class LegacyPropertyHelper implements Serializable {
*/
public static boolean isLegacyToStringEnabled() {
if (VaadinService.getCurrent() == null) {
- // This should really not happen but we need to handle it somehow.
- // IF it happens it seems more safe to use the legacy mode and log.
+ // This will happen at least in JUnit tests. We do not what the real
+ // value should be but it seems more safe to use the legacy mode.
return true;
}
return VaadinService.getCurrent().getDeploymentConfiguration()
@@ -87,9 +87,9 @@ public class LegacyPropertyHelper implements Serializable {
private static boolean logLegacyToStringWarning() {
if (VaadinService.getCurrent() == null) {
- // This should really not happen but we need to handle it somehow.
- // IF it happens it seems more safe to use the legacy mode and log.
- return true;
+ // This will happen at least in JUnit tests. We do not want to spam
+ // the log with these messages in this case.
+ return false;
}
return VaadinService.getCurrent().getDeploymentConfiguration()
.getLegacyPropertyToStringMode() == LegacyProperyToStringMode.WARNING;