summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-07-08 09:23:18 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-21 14:40:14 +0300
commit517485502af1f86358a44bd7067389d4b55aeba8 (patch)
treef7403c2497b3401da3483cd48e726d42ba4e6c15 /client
parent41db27c0adfe9a75352ed4e1f58ac0eee5b23422 (diff)
downloadvaadin-framework-517485502af1f86358a44bd7067389d4b55aeba8.tar.gz
vaadin-framework-517485502af1f86358a44bd7067389d4b55aeba8.zip
Eliminate unguarded Profiler string concatenation
Even though the call to Profiler.enter would be eliminated by the compiler, it would still include the string concatenation since it can't prove it wouldn't have any side effects. Change-Id: I26391549fac48bbca71f30b216dd175c964b8b34
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/AbstractComponentConnector.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java
index 24a0438476..1f09c14fb0 100644
--- a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java
+++ b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java
@@ -103,11 +103,15 @@ public abstract class AbstractComponentConnector extends AbstractConnector
@Override
public Widget getWidget() {
if (widget == null) {
- Profiler.enter("AbstractComponentConnector.createWidget for "
- + getClass().getSimpleName());
+ if (Profiler.isEnabled()) {
+ Profiler.enter("AbstractComponentConnector.createWidget for "
+ + getClass().getSimpleName());
+ }
widget = createWidget();
- Profiler.leave("AbstractComponentConnector.createWidget for "
- + getClass().getSimpleName());
+ if (Profiler.isEnabled()) {
+ Profiler.leave("AbstractComponentConnector.createWidget for "
+ + getClass().getSimpleName());
+ }
}
return widget;