From: Artur Signell Date: Fri, 29 Jun 2012 17:41:13 +0000 (+0300) Subject: Don't throw NPE if there is no implementation (#9081) X-Git-Tag: 7.0.0.alpha3^0 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c2c1270786c04ee1bd01729f72d63a6553a0b0a7;p=vaadin-framework.git Don't throw NPE if there is no implementation (#9081) --- diff --git a/src/com/vaadin/terminal/gwt/client/VConsole.java b/src/com/vaadin/terminal/gwt/client/VConsole.java index dee8529a84..a221b42d67 100644 --- a/src/com/vaadin/terminal/gwt/client/VConsole.java +++ b/src/com/vaadin/terminal/gwt/client/VConsole.java @@ -57,35 +57,49 @@ public class VConsole { } public static void log(String msg) { - impl.log(msg); + if (impl != null) { + impl.log(msg); + } } public static void log(Throwable e) { - impl.log(e); + if (impl != null) { + impl.log(e); + } } public static void error(Throwable e) { - impl.error(e); + if (impl != null) { + impl.error(e); + } } public static void error(String msg) { - impl.error(msg); + if (impl != null) { + impl.error(msg); + } } public static void printObject(Object msg) { - impl.printObject(msg); + if (impl != null) { + impl.printObject(msg); + } } public static void dirUIDL(ValueMap u, ApplicationConfiguration cnf) { - impl.dirUIDL(u, cnf); + if (impl != null) { + impl.dirUIDL(u, cnf); + } } public static void printLayoutProblems(ValueMap meta, ApplicationConnection applicationConnection, Set zeroHeightComponents, Set zeroWidthComponents) { - impl.printLayoutProblems(meta, applicationConnection, - zeroHeightComponents, zeroWidthComponents); + if (impl != null) { + impl.printLayoutProblems(meta, applicationConnection, + zeroHeightComponents, zeroWidthComponents); + } } }