Skip to content

Commit 8953f91

Browse files
committed
[java] Code cleanup, deleting a debug print and unnecessary casts
1 parent 81f83ca commit 8953f91

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

java/client/src/org/openqa/selenium/support/locators/RelativeLocator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private RelativeBy(Object rootLocator) {
5959
private RelativeBy(Object rootLocator, List<Map<String, Object>> filters) {
6060
if (rootLocator instanceof By) {
6161
assertLocatorCanBeSerialized(rootLocator);
62-
rootLocator = asAtomLocatorParameter((By) rootLocator);
62+
rootLocator = asAtomLocatorParameter(rootLocator);
6363
} else if (rootLocator instanceof Map) {
6464
if (((Map<?, ?>) rootLocator).keySet().size() != 1) {
6565
throw new IllegalArgumentException(
@@ -158,7 +158,6 @@ public List<WebElement> findElements(SearchContext context) {
158158

159159
@SuppressWarnings("unchecked")
160160
List<WebElement> elements = (List<WebElement>) js.executeScript(FIND_ELEMENTS, this.toJson());
161-
System.out.println(elements);
162161
return elements;
163162
}
164163

@@ -215,7 +214,7 @@ private static Object asAtomLocatorParameter(Object object) {
215214
throw new IllegalArgumentException("Expected locator to be either an element or a By: " + object);
216215
}
217216

218-
assertLocatorCanBeSerialized((By) object);
217+
assertLocatorCanBeSerialized(object);
219218

220219
Map<String, Object> raw = JSON.toType(JSON.toJson(object), MAP_TYPE);
221220

0 commit comments

Comments
 (0)