aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-07-08 09:23:18 +0300
committerVaadin Code Review <review@vaadin.com>2015-07-11 06:33:23 +0000
commit3c811e29a79da46a8124239e69ec473ad3dafcde (patch)
tree112839f25036fbccd71460d5e563f54198bb67a6 /client
parent8f74bb0faadda823c0d2f6180e6e37ed4c61def9 (diff)
downloadvaadin-framework-3c811e29a79da46a8124239e69ec473ad3dafcde.tar.gz
vaadin-framework-3c811e29a79da46a8124239e69ec473ad3dafcde.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: Iae3f6d18c409f019d2207d212d00ecb78078bc3e
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;