Skip to content

Commit 1fee32b

Browse files
asashourbarancev
authored andcommitted
Remove unused imports/methods/fields
Signed-off-by: Alexei Barantsev <barancev@gmail.com>
1 parent 5b1e66f commit 1fee32b

26 files changed

+17
-71
lines changed

java/client/src/com/thoughtworks/selenium/webdriven/WebDriverCommandProcessor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.openqa.selenium.JavascriptExecutor;
3131
import org.openqa.selenium.WebDriver;
3232
import org.openqa.selenium.internal.WrapsDriver;
33-
import org.openqa.selenium.remote.CapabilityType;
3433

3534
import java.util.Map;
3635
import java.util.function.Supplier;

java/client/src/org/openqa/selenium/Platform.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,6 @@ public Platform family() {
160160
},
161161

162162
ANDROID("android", "dalvik") {
163-
public String getLineEnding() {
164-
return "\n";
165-
}
166-
167163
@Override
168164
public Platform family() {
169165
return LINUX;

java/client/src/org/openqa/selenium/firefox/FirefoxDriver.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.openqa.selenium.Capabilities;
2929
import org.openqa.selenium.Proxy;
3030
import org.openqa.selenium.WebDriverException;
31-
import org.openqa.selenium.remote.BeanToJsonConverter;
3231
import org.openqa.selenium.remote.CommandExecutor;
3332
import org.openqa.selenium.remote.DesiredCapabilities;
3433
import org.openqa.selenium.remote.FileDetector;

java/client/src/org/openqa/selenium/remote/JsonToBeanConverter.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,6 @@ private Method getMethod(Class<?> clazz, String methodName) {
241241
return null;
242242
}
243243

244-
private Object convertJsonPrimitive(JsonElement json) {
245-
return convertJsonPrimitive(json.getAsJsonPrimitive());
246-
}
247-
248244
private Object convertJsonPrimitive(JsonPrimitive json) {
249245
if (json.isBoolean()) {
250246
return json.getAsBoolean();
@@ -260,7 +256,6 @@ private Object convertJsonPrimitive(JsonPrimitive json) {
260256
}
261257
}
262258

263-
@SuppressWarnings("unchecked")
264259
private Enum convertEnum(Class clazz, Object text) {
265260
String toConvert = text instanceof JsonElement ?
266261
((JsonElement) text).getAsString() : String.valueOf(text);

java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,8 @@ public Dimension getSize() {
908908
return new Dimension(width, height);
909909
}
910910

911-
@SuppressWarnings({"unchecked"})
912911
Map<String, Object> rawPoint;
912+
@SuppressWarnings("unchecked")
913913
public Point getPosition() {
914914
Response response = execute(DriverCommand.GET_CURRENT_WINDOW_POSITION,
915915
ImmutableMap.of("windowHandle", "current"));

java/client/test/com/thoughtworks/selenium/corebased/TestBasicAuth.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@
1919
package com.thoughtworks.selenium.corebased;
2020

2121
import static org.junit.Assume.assumeFalse;
22-
import static org.junit.Assume.assumeTrue;
2322

2423
import com.thoughtworks.selenium.InternalSelenseTestBase;
2524

26-
import org.junit.Assume;
2725
import org.junit.Test;
28-
import org.openqa.selenium.HasCapabilities;
29-
import org.openqa.selenium.WebDriver;
3026
import org.openqa.selenium.environment.GlobalTestEnvironment;
3127
import org.openqa.selenium.environment.webserver.AppServer;
3228
import org.openqa.selenium.internal.WrapsDriver;

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@
1919

2020
import static java.nio.charset.StandardCharsets.UTF_8;
2121
import static org.junit.Assert.assertEquals;
22-
import static org.junit.Assume.assumeFalse;
2322
import static org.openqa.selenium.remote.CapabilityType.PROXY;
2423
import static org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated;
2524
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
2625
import static org.openqa.selenium.testing.Driver.FIREFOX;
27-
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
2826
import static org.openqa.selenium.testing.Driver.IE;
2927
import static org.openqa.selenium.testing.Driver.MARIONETTE;
3028
import static org.openqa.selenium.testing.Driver.PHANTOMJS;
@@ -439,7 +437,6 @@ protected void after() {
439437
*/
440438
private abstract static class ServerResource extends ExternalResource {
441439
protected final Server server;
442-
private final int port;
443440
private final HostAndPort hostAndPort;
444441

445442
ServerResource() {
@@ -450,7 +447,6 @@ private abstract static class ServerResource extends ExternalResource {
450447
http.setPort(port);
451448
http.setIdleTimeout(500000);
452449

453-
this.port = port;
454450
this.server.addConnector(http);
455451
this.hostAndPort = HostAndPort.fromParts("localhost", port);
456452
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ private boolean onlyWhite(Set<String> colors) {
506506
*
507507
* @param im image
508508
*/
509+
@SuppressWarnings("unused")
509510
private void saveImageToTmpFile(BufferedImage im) {
510511

511512
File outputfile = new File( testName.getMethodName() + "_image.png");

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import static org.junit.Assert.assertThat;
2626
import static org.junit.Assume.assumeFalse;
2727
import static org.openqa.selenium.WaitingConditions.elementValueToEqual;
28-
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
2928
import static org.openqa.selenium.testing.Driver.IE;
3029
import static org.openqa.selenium.testing.Driver.MARIONETTE;
3130
import static org.openqa.selenium.testing.Driver.PHANTOMJS;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static org.junit.Assert.assertThat;
2222
import static org.junit.Assert.assertTrue;
2323
import static org.junit.Assume.assumeFalse;
24-
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
2524
import static org.openqa.selenium.testing.Driver.IE;
2625
import static org.openqa.selenium.testing.Driver.MARIONETTE;
2726
import static org.openqa.selenium.testing.Driver.SAFARI;

0 commit comments

Comments
 (0)