Skip to content

Commit bd914ec

Browse files
committed
Merge pull request #279 from TikhomirovSergey/master
Source code format issues fix
2 parents 07fe6d4 + ad9f757 commit bd914ec

25 files changed

+1407
-1407
lines changed

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

Lines changed: 409 additions & 409 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public Response execute(String driverCommand, Map<String, ?> parameters) {
4242
return super.execute(driverCommand, parameters);
4343
}
4444

45-
@Override
45+
@Override
4646
public List findElements(By by){
4747
return super.findElements(by);
4848
}
@@ -52,7 +52,7 @@ public T findElement(By by){
5252
return (T) super.findElement(by);
5353
}
5454

55-
@Override
55+
@Override
5656
public List findElementsById(String id){
5757
return super.findElementsById(id);
5858
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public Response execute(String driverCommand, Map<String, ?> parameters) {
4444
return super.execute(driverCommand, parameters);
4545
}
4646

47-
@Override
47+
@Override
4848
public List findElements(By by){
4949
return super.findElements(by);
5050
}
@@ -54,7 +54,7 @@ public T findElement(By by){
5454
return (T) super.findElement(by);
5555
}
5656

57-
@Override
57+
@Override
5858
public List findElementsById(String id){
5959
return super.findElementsById(id);
6060
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919

2020
public interface DeviceActionShortcuts {
2121

22-
/**
23-
* Hides the keyboard if it is showing.
24-
* On iOS, there are multiple strategies for hiding the keyboard. Defaults to the "tapOutside" strategy (taps outside the keyboard).
25-
* Switch to using hideKeyboard(HideKeyboardStrategy.PRESS_KEY, "Done") if this doesn't work.
26-
*/
27-
public void hideKeyboard();
22+
/**
23+
* Hides the keyboard if it is showing.
24+
* On iOS, there are multiple strategies for hiding the keyboard. Defaults to the "tapOutside" strategy (taps outside the keyboard).
25+
* Switch to using hideKeyboard(HideKeyboardStrategy.PRESS_KEY, "Done") if this doesn't work.
26+
*/
27+
void hideKeyboard();
2828

2929
}

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818

1919

2020
public interface HasAppStrings {
21-
22-
/**
23-
* Get all defined Strings from an app for the default language
24-
*
25-
* @return a string of all the localized strings defined in the app
26-
*/
27-
public String getAppStrings();
2821

29-
/**
30-
* Get all defined Strings from an app for the specified language
31-
*
32-
* @param language strings language code
33-
* @return a string of all the localized strings defined in the app
34-
*/
35-
public String getAppStrings(String language);
22+
/**
23+
* Get all defined Strings from an app for the default language
24+
*
25+
* @return a string of all the localized strings defined in the app
26+
*/
27+
String getAppStrings();
28+
29+
/**
30+
* Get all defined Strings from an app for the specified language
31+
*
32+
* @param language strings language code
33+
* @return a string of all the localized strings defined in the app
34+
*/
35+
String getAppStrings(String language);
3636

3737
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
import org.openqa.selenium.WebDriverException;
2020

2121
public class IllegalCoordinatesException extends WebDriverException {
22-
private static final long serialVersionUID = 1L;
22+
private static final long serialVersionUID = 1L;
2323

24-
public IllegalCoordinatesException(String message) {
25-
super(message);
26-
}
24+
public IllegalCoordinatesException(String message) {
25+
super(message);
26+
}
2727

2828
}

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

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,54 +17,54 @@
1717
package io.appium.java_client;
1818

1919
public interface InteractsWithApps {
20-
/**
21-
* Launch the app which was provided in the capabilities at session creation
22-
*/
23-
public void launchApp();
20+
/**
21+
* Launch the app which was provided in the capabilities at session creation
22+
*/
23+
void launchApp();
2424

25-
/**
26-
* Install an app on the mobile device
27-
*
28-
* @param appPath
29-
* path to app to install
30-
*/
31-
public void installApp(String appPath);
25+
/**
26+
* Install an app on the mobile device
27+
*
28+
* @param appPath
29+
* path to app to install
30+
*/
31+
void installApp(String appPath);
3232

33-
/**
34-
* Checks if an app is installed on the device
35-
*
36-
* @param bundleId
37-
* bundleId of the app
38-
* @return True if app is installed, false otherwise
39-
*/
40-
public boolean isAppInstalled(String bundleId);
33+
/**
34+
* Checks if an app is installed on the device
35+
*
36+
* @param bundleId
37+
* bundleId of the app
38+
* @return True if app is installed, false otherwise
39+
*/
40+
boolean isAppInstalled(String bundleId);
4141

42-
/**
43-
* Reset the currently running app for this session
44-
*/
45-
public void resetApp();
42+
/**
43+
* Reset the currently running app for this session
44+
*/
45+
void resetApp();
4646

47-
/**
48-
* Runs the current app as a background app for the number of seconds
49-
* requested. This is a synchronous method, it returns after the back has
50-
* been returned to the foreground.
51-
*
52-
* @param seconds
53-
* Number of seconds to run App in background
54-
*/
55-
public void runAppInBackground(int seconds);
47+
/**
48+
* Runs the current app as a background app for the number of seconds
49+
* requested. This is a synchronous method, it returns after the back has
50+
* been returned to the foreground.
51+
*
52+
* @param seconds
53+
* Number of seconds to run App in background
54+
*/
55+
void runAppInBackground(int seconds);
5656

57-
/**
58-
* Remove the specified app from the device (uninstall)
59-
*
60-
* @param bundleId
61-
* the bunble identifier (or app id) of the app to remove
62-
*/
63-
public void removeApp(String bundleId);
57+
/**
58+
* Remove the specified app from the device (uninstall)
59+
*
60+
* @param bundleId
61+
* the bunble identifier (or app id) of the app to remove
62+
*/
63+
void removeApp(String bundleId);
6464

65-
/**
66-
* Close the app which was provided in the capabilities at session creation
67-
*/
68-
public void closeApp();
65+
/**
66+
* Close the app which was provided in the capabilities at session creation
67+
*/
68+
void closeApp();
6969

7070
}

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@
1818

1919
public interface InteractsWithFiles {
2020

21-
/**
22-
*
23-
* @param remotePath
24-
* On Android and iOS, this is either the path to the file
25-
* (relative to the root of the app's file system). On iOS only,
26-
* if path starts with /AppName.app, which will be replaced with
27-
* the application's .app directory
28-
* @return A byte array of Base64 encoded data.
29-
*/
30-
public byte[] pullFile(String remotePath);
21+
/**
22+
*
23+
* @param remotePath
24+
* On Android and iOS, this is either the path to the file
25+
* (relative to the root of the app's file system). On iOS only,
26+
* if path starts with /AppName.app, which will be replaced with
27+
* the application's .app directory
28+
* @return A byte array of Base64 encoded data.
29+
*/
30+
byte[] pullFile(String remotePath);
3131

32-
/**
33-
* Pull a folder from the simulator/device. Does not work on iOS Real
34-
* Devices, but works on simulators
35-
*
36-
* @param remotePath
37-
* On Android and iOS, this is either the path to the file
38-
* (relative to the root of the app's file system). On iOS only,
39-
* if path starts with /AppName.app, which will be replaced with
40-
* the application's .app directory
41-
* @return A byte array of Base64 encoded data, representing a ZIP ARCHIVE
42-
* of the contents of the requested folder.
43-
*/
44-
public byte[] pullFolder(String remotePath);
32+
/**
33+
* Pull a folder from the simulator/device. Does not work on iOS Real
34+
* Devices, but works on simulators
35+
*
36+
* @param remotePath
37+
* On Android and iOS, this is either the path to the file
38+
* (relative to the root of the app's file system). On iOS only,
39+
* if path starts with /AppName.app, which will be replaced with
40+
* the application's .app directory
41+
* @return A byte array of Base64 encoded data, representing a ZIP ARCHIVE
42+
* of the contents of the requested folder.
43+
*/
44+
byte[] pullFolder(String remotePath);
4545

4646
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
import java.util.Map;
2727

2828
public interface MobileDriver extends WebDriver,
29-
PerformsTouchActions,
29+
PerformsTouchActions,
3030
ContextAware, Rotatable, FindsByAccessibilityId<WebElement>, LocationContext,
3131
DeviceActionShortcuts, TouchShortcuts, InteractsWithFiles,
3232
InteractsWithApps, ScrollsTo<WebElement>, HasAppStrings {
33-
public Response execute(String driverCommand, Map<String, ?> parameters);
33+
Response execute(String driverCommand, Map<String, ?> parameters);
3434
}

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

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -28,41 +28,41 @@
2828
@SuppressWarnings({ "unchecked"})
2929
public abstract class MobileElement extends DefaultGenericMobileElement<MobileElement> {
3030

31-
protected FileDetector fileDetector;
32-
33-
public Point getCenter() {
34-
Point upperLeft = this.getLocation();
35-
Dimension dimensions = this.getSize();
36-
return new Point(upperLeft.getX() + dimensions.getWidth() / 2, upperLeft.getY() + dimensions.getHeight() / 2);
37-
}
38-
39-
@Override
40-
public void pinch() {
41-
((AppiumDriver<?>) parent).pinch(this);
42-
}
43-
44-
@Override
45-
public void tap(int fingers, int duration) {
46-
((AppiumDriver<?>) parent).tap(fingers, this, duration);
47-
}
48-
49-
@Override
50-
public void zoom() {
51-
((AppiumDriver<?>) parent).zoom(this);
52-
}
53-
54-
55-
@Override
56-
public void swipe(SwipeElementDirection direction, int duration) {
57-
direction.swipe((AppiumDriver<?>) parent, this, 0, 0, duration);
58-
}
59-
60-
@Override
61-
public void swipe(SwipeElementDirection direction, int offsetFromStartBorder,
62-
int offsetFromEndBorder, int duration) throws IllegalCoordinatesException {
63-
direction.swipe((AppiumDriver<?>) parent, this, offsetFromStartBorder,
64-
offsetFromEndBorder, duration);
65-
}
31+
protected FileDetector fileDetector;
32+
33+
public Point getCenter() {
34+
Point upperLeft = this.getLocation();
35+
Dimension dimensions = this.getSize();
36+
return new Point(upperLeft.getX() + dimensions.getWidth() / 2, upperLeft.getY() + dimensions.getHeight() / 2);
37+
}
38+
39+
@Override
40+
public void pinch() {
41+
((AppiumDriver<?>) parent).pinch(this);
42+
}
43+
44+
@Override
45+
public void tap(int fingers, int duration) {
46+
((AppiumDriver<?>) parent).tap(fingers, this, duration);
47+
}
48+
49+
@Override
50+
public void zoom() {
51+
((AppiumDriver<?>) parent).zoom(this);
52+
}
53+
54+
55+
@Override
56+
public void swipe(SwipeElementDirection direction, int duration) {
57+
direction.swipe((AppiumDriver<?>) parent, this, 0, 0, duration);
58+
}
59+
60+
@Override
61+
public void swipe(SwipeElementDirection direction, int offsetFromStartBorder,
62+
int offsetFromEndBorder, int duration) throws IllegalCoordinatesException {
63+
direction.swipe((AppiumDriver<?>) parent, this, offsetFromStartBorder,
64+
offsetFromEndBorder, duration);
65+
}
6666

6767
@Override
6868
public List<MobileElement> findElements(By by){
@@ -74,7 +74,7 @@ public List<MobileElement> findElementsById(String id){
7474
return super.findElementsById(id);
7575
}
7676

77-
public List<MobileElement> findElementsByLinkText(String using) {
77+
public List<MobileElement> findElementsByLinkText(String using) {
7878
return super.findElementsByLinkText(using);
7979
}
8080

@@ -98,16 +98,16 @@ public List<MobileElement> findElementsByCssSelector(String using) {
9898
return super.findElementsByCssSelector(using);
9999
}
100100

101-
public List<MobileElement> findElementsByXPath(String using) {
101+
public List<MobileElement> findElementsByXPath(String using) {
102102
return super.findElementsByXPath(using);
103103
}
104104

105105
@Override
106106
public List<MobileElement> findElementsByAccessibilityId(String using) {
107-
List<MobileElement> result = new ArrayList<MobileElement>();
108-
List<WebElement> found = findElements("accessibility id", using);
109-
for (WebElement e: found)
110-
result.add((MobileElement) e);
111-
return result;
107+
List<MobileElement> result = new ArrayList<MobileElement>();
108+
List<WebElement> found = findElements("accessibility id", using);
109+
for (WebElement e: found)
110+
result.add((MobileElement) e);
111+
return result;
112112
}
113113
}

0 commit comments

Comments
 (0)