aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-10-31 18:51:22 +0100
committerPekka Maanpää <pekkamaa@vaadin.com>2017-10-31 19:51:22 +0200
commit04905e1e2eb81770d813abda6a516254e541443d (patch)
treec7b7f1defd8dc908971dfaec0251195707003d22 /uitest/src/main/java/com
parentd44a5e217d1fc2852adb84cc6ce1c0146ac603f2 (diff)
downloadvaadin-framework-04905e1e2eb81770d813abda6a516254e541443d.tar.gz
vaadin-framework-04905e1e2eb81770d813abda6a516254e541443d.zip
Use local variable for getWidget(). (#10253)
In some places, getWidget() is called many times, and I believe this can have a litte performance improvement, since in some cases super.getWidget() is called more than once.
Diffstat (limited to 'uitest/src/main/java/com')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java
index 4a4bb58488..068896f323 100644
--- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java
+++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/ResizeTerrorizerControlConnector.java
@@ -244,17 +244,18 @@ public class ResizeTerrorizerControlConnector extends AbstractComponentConnector
@Override
public void postLayout() {
- if (getWidget().startWidth.getValue() == null) {
+ ResizeTerrorizerControlPanel panel = getWidget();
+ if (panel.startWidth.getValue() == null) {
int width = getTarget().getWidget().getElement().getOffsetWidth();
- getWidget().startWidth.setValue(width);
- getWidget().endWidth
+ panel.startWidth.setValue(width);
+ panel.endWidth
.setValue(width + getState().defaultWidthOffset);
}
- if (getWidget().startHeight.getValue() == null) {
+ if (panel.startHeight.getValue() == null) {
int height = getTarget().getWidget().getElement().getOffsetHeight();
- getWidget().startHeight.setValue(height);
- getWidget().endHeight
+ panel.startHeight.setValue(height);
+ panel.endHeight
.setValue(height + getState().defaultHeightOffset);
}
}