Author: lfryc(a)redhat.com
Date: 2011-01-27 05:44:44 -0500 (Thu, 27 Jan 2011)
New Revision: 21260
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/ReferencedLocator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/AbstractModel.java
Log:
following changes in richfaces-selenium: format() method for Locator returns
Locator<T> - all childs are returning own type
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/ReferencedLocator.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/ReferencedLocator.java 2011-01-27
10:43:57 UTC (rev 21259)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/jboss/test/selenium/locator/reference/ReferencedLocator.java 2011-01-27
10:44:44 UTC (rev 21260)
@@ -65,7 +65,6 @@
public T getReferenced() {
ExtendedLocator<T> referencedLocator = reference.getLocator();
-
@SuppressWarnings("unchecked")
Class<T> tClass = (Class<T>) referencedLocator.getClass();
@@ -125,11 +124,10 @@
return getReferenced().getDescendants(elementLocator);
}
- public T format(Object... args) {
+ public ReferencedLocator<T> format(Object... args) {
String newAddition = SimplifiedFormat.format(addition, args);
try {
- // TODO fix the <T> param cast
- return (T) new ReferencedLocator<T>(this.reference, newAddition);
+ return (ReferencedLocator<T>) new
ReferencedLocator<T>(this.reference, newAddition);
} catch (Exception e) {
throw new IllegalStateException(e);
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/AbstractModel.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/AbstractModel.java 2011-01-27
10:43:57 UTC (rev 21259)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/model/AbstractModel.java 2011-01-27
10:44:44 UTC (rev 21260)
@@ -128,7 +128,7 @@
}
@Override
- public T format(Object... args) {
+ public ExtendedLocator<T> format(Object... args) {
return root.getLocator().format(args);
}