diff options
author | Artur Signell <artur@vaadin.com> | 2015-01-14 11:35:10 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-01-14 10:22:31 +0000 |
commit | dcfebeb46143d8e9c21424c572c48d2217c80477 (patch) | |
tree | 42c6abb94434ab7bdd0469c25ec0e268534d2fd3 | |
parent | b94fdb05a7fa6ae40f91d7f5311b9f0c0b775045 (diff) | |
download | vaadin-framework-dcfebeb46143d8e9c21424c572c48d2217c80477.tar.gz vaadin-framework-dcfebeb46143d8e9c21424c572c48d2217c80477.zip |
Revert to old simpleName logic (differs for inner classes) (#15544)
All existing recorded TB tests contain Outer$Inner and not Inner so they will
fail if this is switched to using Class.getSimpleName
Change-Id: Ic79355fbc61403ed2929271d302db35e20dda38c
-rw-r--r-- | client/src/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java | 12 | ||||
-rw-r--r-- | client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/client/src/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java b/client/src/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java index 16f21d5d66..517d979c8e 100644 --- a/client/src/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java +++ b/client/src/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java @@ -455,7 +455,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { if (basePath == null) { return null; } - String simpleName = w.getClass().getSimpleName(); + String simpleName = Util.getSimpleName(w); /* * Check if the parent implements Iterable. At least VPopupView does not @@ -475,7 +475,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { return basePath + PARENTCHILD_SEPARATOR + simpleName + "[" + pos + "]"; } - String simpleName2 = child.getClass().getSimpleName(); + String simpleName2 = Util.getSimpleName(child); if (simpleName.equals(simpleName2)) { pos++; } @@ -606,8 +606,8 @@ public class LegacyLocatorStrategy implements LocatorStrategy { // the same type before it int nextIndex = 0; for (Widget child : layout) { - boolean matchingType = nextWidgetClassName.equals(child - .getClass().getSimpleName()); + boolean matchingType = nextWidgetClassName.equals(Util + .getSimpleName(child)); if (matchingType && widgetPosition == 0) { // This is the n:th child that we looked for break; @@ -661,7 +661,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { while (iterator.hasNext()) { Widget child = iterator.next(); - String simpleName2 = child.getClass().getSimpleName(); + String simpleName2 = Util.getSimpleName(child); if (!widgetClassName.equals(simpleName2) && child instanceof Slot) { @@ -671,7 +671,7 @@ public class LegacyLocatorStrategy implements LocatorStrategy { * directly checking the stuff inside the slot */ child = ((Slot) child).getWidget(); - simpleName2 = child.getClass().getSimpleName(); + simpleName2 = Util.getSimpleName(child); } if (widgetClassName.equals(simpleName2)) { diff --git a/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java b/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java index ea0fd2042e..44bdeddff3 100644 --- a/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java +++ b/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java @@ -644,7 +644,7 @@ public class VaadinFinderLocatorStrategy implements LocatorStrategy { // If the server-side class name didn't match, fall back to testing for // the explicit widget name - String widget = connector.getWidget().getClass().getSimpleName(); + String widget = Util.getSimpleName(connector.getWidget()); return widgetName.equals(widget) || widgetName.equals(widget + ".class"); |