Skip to content

Commit 44b67fb

Browse files
Checkstyle issue fix
1 parent b706a5a commit 44b67fb

File tree

9 files changed

+55
-33
lines changed

9 files changed

+55
-33
lines changed

src/main/java/io/appium/java_client/DefaultGenericMobileDriver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package io.appium.java_client;
1818

1919
import com.google.common.collect.ImmutableMap;
20+
2021
import org.openqa.selenium.By;
2122
import org.openqa.selenium.Capabilities;
2223
import org.openqa.selenium.WebDriverException;

src/main/java/io/appium/java_client/DefaultGenericMobileElement.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package io.appium.java_client;
1818

1919
import com.google.common.collect.ImmutableMap;
20+
2021
import org.openqa.selenium.By;
2122
import org.openqa.selenium.WebDriverException;
2223
import org.openqa.selenium.WebElement;

src/main/java/io/appium/java_client/ExecutesMethod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
public interface ExecutesMethod {
2424
/**
25-
* Executes JSONWP command and returns a response
25+
* Executes JSONWP command and returns a response.
2626
*
2727
* @param driverCommand a JSONWP command
2828
* @param parameters map of command parameters
@@ -31,7 +31,7 @@ public interface ExecutesMethod {
3131
Response execute(String driverCommand, Map<String, ?> parameters);
3232

3333
/**
34-
* Executes JSONWP command and returns a response
34+
* Executes JSONWP command and returns a response.
3535
*
3636
* @param driverCommand a JSONWP command
3737
* @return a result response

src/main/java/io/appium/java_client/InteractsWithApps.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
import static io.appium.java_client.MobileCommand.INSTALL_APP;
2121
import static io.appium.java_client.MobileCommand.IS_APP_INSTALLED;
2222
import static io.appium.java_client.MobileCommand.LAUNCH_APP;
23-
import static io.appium.java_client.MobileCommand.prepareArguments;
24-
import static io.appium.java_client.MobileCommand.RESET;
2523
import static io.appium.java_client.MobileCommand.REMOVE_APP;
24+
import static io.appium.java_client.MobileCommand.RESET;
2625
import static io.appium.java_client.MobileCommand.RUN_APP_IN_BACKGROUND;
26+
import static io.appium.java_client.MobileCommand.prepareArguments;
2727

2828
import com.google.common.collect.ImmutableMap;
2929

src/main/java/io/appium/java_client/InteractsWithFiles.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static io.appium.java_client.MobileCommand.PULL_FOLDER;
2121

2222
import com.google.common.collect.ImmutableMap;
23+
2324
import org.openqa.selenium.remote.Response;
2425

2526
import javax.xml.bind.DatatypeConverter;
@@ -49,7 +50,7 @@ default byte[] pullFile(String remotePath) {
4950
* if path starts with /AppName.app, which will be replaced with
5051
* the application's .app directory
5152
* @return A byte array of Base64 encoded data, representing a ZIP ARCHIVE
52-
* of the contents of the requested folder.
53+
* of the contents of the requested folder.
5354
*/
5455
default byte[] pullFolder(String remotePath) {
5556
Response response = execute(PULL_FOLDER, ImmutableMap.of("path", remotePath));

src/main/java/io/appium/java_client/ios/IOSDeviceActionShortcuts.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
package io.appium.java_client.ios;
1818

19-
import io.appium.java_client.CommandExecutionHelper;
20-
import io.appium.java_client.DeviceActionShortcuts;
21-
2219
import static io.appium.java_client.ios.IOSMobileCommandHelper.hideKeyboardCommand;
2320
import static io.appium.java_client.ios.IOSMobileCommandHelper.shakeCommand;
2421

22+
import io.appium.java_client.CommandExecutionHelper;
23+
import io.appium.java_client.DeviceActionShortcuts;
24+
2525
public interface IOSDeviceActionShortcuts extends DeviceActionShortcuts {
2626

2727
/**

src/test/java/io/appium/java_client/events/EmptyWebDriver.java

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,19 @@
88
import io.appium.java_client.FindsByIosUIAutomation;
99

1010
import org.apache.commons.lang3.StringUtils;
11-
import org.openqa.selenium.*;
11+
import org.openqa.selenium.Alert;
12+
import org.openqa.selenium.By;
13+
import org.openqa.selenium.Capabilities;
14+
import org.openqa.selenium.ContextAware;
15+
import org.openqa.selenium.Cookie;
16+
import org.openqa.selenium.HasCapabilities;
17+
import org.openqa.selenium.JavascriptExecutor;
18+
import org.openqa.selenium.NoSuchElementException;
19+
import org.openqa.selenium.Rotatable;
20+
import org.openqa.selenium.ScreenOrientation;
21+
import org.openqa.selenium.WebDriver;
22+
import org.openqa.selenium.WebDriverException;
23+
import org.openqa.selenium.WebElement;
1224
import org.openqa.selenium.internal.FindsByClassName;
1325
import org.openqa.selenium.internal.FindsByCssSelector;
1426
import org.openqa.selenium.internal.FindsById;
@@ -65,12 +77,22 @@ private static List<StubWebElement> createStubList() {
6577
return null;
6678
}
6779

80+
@Override public StubWebElement findElement(By by) {
81+
return new StubWebElement();
82+
}
83+
84+
@Override
85+
public StubWebElement findElement(String by, String using) throws WebDriverException, NoSuchElementException {
86+
return new StubWebElement();
87+
}
88+
6889
@Override public List<StubWebElement> findElements(By by) {
6990
return createStubList();
7091
}
7192

72-
@Override public StubWebElement findElement(By by) {
73-
return new StubWebElement();
93+
@Override
94+
public List<StubWebElement> findElements(String by, String using) throws WebDriverException {
95+
return createStubList();
7496
}
7597

7698
@Override public String getPageSource() {
@@ -200,16 +222,6 @@ private static List<StubWebElement> createStubList() {
200222
return new DesiredCapabilities(map);
201223
}
202224

203-
@Override
204-
public StubWebElement findElement(String by, String using) throws WebDriverException, NoSuchElementException {
205-
return new StubWebElement();
206-
}
207-
208-
@Override
209-
public List<StubWebElement> findElements(String by, String using) throws WebDriverException {
210-
return createStubList();
211-
}
212-
213225
private class StubTargetLocator implements TargetLocator {
214226

215227
private final WebDriver driver;

src/test/java/io/appium/java_client/events/FewInstancesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package io.appium.java_client.events;
22

33
import static org.hamcrest.core.Is.is;
4-
import static org.junit.Assert.assertThat;
54
import static org.junit.Assert.assertNotEquals;
5+
import static org.junit.Assert.assertThat;
66

77
import io.appium.java_client.events.listeners.AlertListener;
88
import io.appium.java_client.events.listeners.ContextListener;

src/test/java/io/appium/java_client/events/StubWebElement.java

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
import io.appium.java_client.FindsByAndroidUIAutomator;
77
import io.appium.java_client.FindsByFluentSelector;
88
import io.appium.java_client.FindsByIosUIAutomation;
9-
import org.openqa.selenium.*;
9+
import org.openqa.selenium.By;
10+
import org.openqa.selenium.Dimension;
11+
import org.openqa.selenium.NoSuchElementException;
12+
import org.openqa.selenium.OutputType;
13+
import org.openqa.selenium.Point;
14+
import org.openqa.selenium.Rectangle;
15+
import org.openqa.selenium.WebDriverException;
16+
import org.openqa.selenium.WebElement;
1017
import org.openqa.selenium.internal.FindsByClassName;
1118
import org.openqa.selenium.internal.FindsByCssSelector;
1219
import org.openqa.selenium.internal.FindsById;
@@ -148,10 +155,20 @@ private static List<WebElement> createStubSubElementList() {
148155
return createStubSubElementList();
149156
}
150157

158+
@Override
159+
public List<WebElement> findElements(String by, String using) throws WebDriverException {
160+
return createStubSubElementList();
161+
}
162+
151163
@Override public WebElement findElement(By by) {
152164
return new StubWebElement();
153165
}
154166

167+
@Override
168+
public WebElement findElement(String by, String using) throws WebDriverException, NoSuchElementException {
169+
return new StubWebElement();
170+
}
171+
155172
@Override public boolean isDisplayed() {
156173
return false;
157174
}
@@ -179,14 +196,4 @@ private static List<WebElement> createStubSubElementList() {
179196
@Override public String toString() {
180197
return this.getClass().getCanonicalName();
181198
}
182-
183-
@Override
184-
public WebElement findElement(String by, String using) throws WebDriverException, NoSuchElementException {
185-
return new StubWebElement();
186-
}
187-
188-
@Override
189-
public List<WebElement> findElements(String by, String using) throws WebDriverException {
190-
return createStubSubElementList();
191-
}
192199
}

0 commit comments

Comments
 (0)