Skip to content

Commit 1f67cbd

Browse files
committed
[java] Backing out more changes in tests that target Java 9
1 parent ddea0d5 commit 1f67cbd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

java/client/test/org/openqa/selenium/WaitingConditions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public String toString() {
141141

142142
public static ExpectedCondition<Point> elementLocationToBe(
143143
final WebElement element, final Point expectedLocation) {
144-
return new ExpectedCondition<String>() {
144+
return new ExpectedCondition<Point>() {
145145
private Point currentLocation = new Point(0, 0);
146146

147147
@Override

java/client/test/org/openqa/selenium/atoms/InputAtomsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class InputAtomsTest {
4141
@Test
4242
public void exportsTheExpectedNames() throws IOException {
4343
final String source = JavaScriptLoader.loadResource(RESOURCE_PATH);
44-
ContextFactory.getGlobal().call(new ContextAction<>() {
44+
ContextFactory.getGlobal().call(new ContextAction<Object>() {
4545
private ScriptableObject global;
4646

4747
@Override

java/client/test/org/openqa/selenium/interactions/BasicMouseInterfaceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ private boolean fuzzyPositionMatching(int expectedX, int expectedY, String locat
493493

494494
private ExpectedCondition<Boolean> fuzzyMatchingOfCoordinates(
495495
final WebElement element, final int x, final int y) {
496-
return new ExpectedCondition<>() {
496+
return new ExpectedCondition<Boolean>() {
497497
@Override
498498
public Boolean apply(WebDriver ignored) {
499499
return fuzzyPositionMatching(x, y, element.getText());

java/client/test/org/openqa/selenium/support/ui/FluentWaitTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void timeoutMessageIncludesToStringOfCondition() {
196196
"Expected condition failed: waiting for toString called "
197197
+ "(tried for 0 second(s) with 500 milliseconds interval)");
198198

199-
Function<Object, Boolean> condition = new Function<>() {
199+
Function<Object, Boolean> condition = new Function<Object, Boolean>() {
200200
@Override
201201
public Boolean apply(Object ignored) {
202202
return false;
@@ -241,7 +241,7 @@ public void callsDeprecatedHandlerForRuntimeExceptions() {
241241
when(mockCondition.apply(mockDriver)).thenThrow(exception);
242242

243243
final TestException sentinelException = new TestException();
244-
FluentWait<WebDriver> wait = new FluentWait<>(mockDriver, mockClock, mockSleeper) {
244+
FluentWait<WebDriver> wait = new FluentWait<WebDriver>(mockDriver, mockClock, mockSleeper) {
245245
@Override
246246
protected RuntimeException timeoutException(String message, Throwable lastException) {
247247
throw sentinelException;

0 commit comments

Comments
 (0)