Skip to content

Commit f53e4bc

Browse files
docs: Address warnings printed by docs linter (#1355)
1 parent d1d0f78 commit f53e4bc

File tree

9 files changed

+28
-2
lines changed

9 files changed

+28
-2
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ default FeaturesMatchingResult matchImagesFeatures(byte[] base64image1, byte[] b
7474
* @param image1 The location of the first image
7575
* @param image2 The location of the second image
7676
* @return The matching result.
77+
* @throws IOException On file system I/O error.
7778
*/
7879
default FeaturesMatchingResult matchImagesFeatures(File image1, File image2) throws IOException {
7980
return matchImagesFeatures(image1, image2, null);
@@ -88,6 +89,7 @@ default FeaturesMatchingResult matchImagesFeatures(File image1, File image2) thr
8889
* @param image2 The location of the second image
8990
* @param options comparison options
9091
* @return The matching result. The configuration of fields in the result depends on comparison options.
92+
* @throws IOException On file system I/O error.
9193
*/
9294
default FeaturesMatchingResult matchImagesFeatures(File image1, File image2,
9395
@Nullable FeaturesMatchingOptions options) throws IOException {
@@ -137,6 +139,7 @@ default OccurrenceMatchingResult findImageOccurrence(byte[] fullImage, byte[] pa
137139
* @param fullImage The location of the full image
138140
* @param partialImage The location of the partial image
139141
* @return The matching result. The configuration of fields in the result depends on comparison options.
142+
* @throws IOException On file system I/O error.
140143
*/
141144
default OccurrenceMatchingResult findImageOccurrence(File fullImage, File partialImage) throws IOException {
142145
return findImageOccurrence(fullImage, partialImage, null);
@@ -152,6 +155,7 @@ default OccurrenceMatchingResult findImageOccurrence(File fullImage, File partia
152155
* @param partialImage The location of the partial image
153156
* @param options comparison options
154157
* @return The matching result. The configuration of fields in the result depends on comparison options.
158+
* @throws IOException On file system I/O error.
155159
*/
156160
default OccurrenceMatchingResult findImageOccurrence(File fullImage, File partialImage,
157161
@Nullable OccurrenceMatchingOptions options)
@@ -202,6 +206,7 @@ default SimilarityMatchingResult getImagesSimilarity(byte[] base64image1, byte[]
202206
* @param image1 The location of the full image
203207
* @param image2 The location of the partial image
204208
* @return Matching result. The configuration of fields in the result depends on comparison options.
209+
* @throws IOException On file system I/O error.
205210
*/
206211
default SimilarityMatchingResult getImagesSimilarity(File image1, File image2) throws IOException {
207212
return getImagesSimilarity(image1, image2, null);
@@ -217,6 +222,7 @@ default SimilarityMatchingResult getImagesSimilarity(File image1, File image2) t
217222
* @param image2 The location of the partial image
218223
* @param options comparison options
219224
* @return Matching result. The configuration of fields in the result depends on comparison options.
225+
* @throws IOException On file system I/O error.
220226
*/
221227
default SimilarityMatchingResult getImagesSimilarity(File image1, File image2,
222228
@Nullable SimilarityMatchingOptions options)

src/main/java/io/appium/java_client/battery/BatteryInfo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public double getLevel() {
2525
/**
2626
* Returns battery state.
2727
*
28+
* @param <T> The type of state data object for the corresponding platform.
2829
* @return Battery state value.
2930
*/
3031
public abstract <T> T getState();

src/main/java/io/appium/java_client/imagecomparison/ComparisonResult.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public byte[] getVisualization() {
6767
* Stores visualization image into the given file.
6868
*
6969
* @param destination file to save image.
70+
* @throws IOException On file system I/O error.
7071
*/
7172
public void storeVisualization(File destination) throws IOException {
7273
final byte[] data = Base64.decodeBase64(getVisualization());

src/main/java/io/appium/java_client/internal/CapabilityHelpers.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class CapabilityHelpers {
2929
* Helper that is used for capability values retrieval.
3030
* Supports both prefixed W3C and "classic" capability names.
3131
*
32+
* @param <T> The corresponding capability type.
3233
* @param caps driver caps object
3334
* @param name capability name
3435
* @param expectedType the expected capability type

src/main/java/io/appium/java_client/internal/Config.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ private Config(String configName) {
3333
/**
3434
* Retrieve a value from properties file.
3535
*
36+
* @param <T> the value type.
3637
* @param key the name of the corresponding key which value to retrieve
3738
* @param valueType the expected type of the value to be retrieved
3839
* @return the actual value
@@ -49,6 +50,7 @@ public <T> T getValue(String key, Class<T> valueType) {
4950
/**
5051
* Retrieve a value from properties file.
5152
*
53+
* @param <T> the type of the resulting value.
5254
* @param key the name of the corresponding key which value to retrieve
5355
* @param valueType the expected type of the value to be retrieved
5456
* @return the actual value or {@link Optional#empty()} if the key is not present

src/main/java/io/appium/java_client/pagefactory/utils/ProxyFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public static <T> T getEnhancedProxy(Class<T> requiredClazz, MethodInterceptor i
3636
/**
3737
* It returns some proxies created by CGLIB.
3838
*
39+
* @param <T> The proxy object class.
3940
* @param requiredClazz is a {@link java.lang.Class} whose instance should be created
4041
* @param params is an array of @link java.lang.Class}. It should be convenient to
4142
* parameter types of some declared constructor which belongs to desired

src/main/java/io/appium/java_client/remote/NewAppiumSessionPayload.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ private static List<String> getAppiumCapabilities(Class<?> capabilityList) {
120120
*
121121
* @param caps capabilities to create a new session
122122
* @return instance of {@link NewAppiumSessionPayload}
123+
* @throws IOException On file system I/O error.
123124
*/
124125
public static NewAppiumSessionPayload create(Capabilities caps) throws IOException {
125126
boolean forceMobileJSONWP =
@@ -235,6 +236,7 @@ private void validate() throws IOException {
235236
* Writes json capabilities to some appendable object.
236237
*
237238
* @param appendable to write a json
239+
* @throws IOException On file system I/O error.
238240
*/
239241
public void writeTo(Appendable appendable) throws IOException {
240242
try (JsonOutput json = new Json().newOutput(appendable)) {
@@ -304,6 +306,9 @@ private void writeMetaData(JsonOutput out) throws IOException {
304306
* in the W3C WebDriver spec. The OSS {@link Capabilities} are listed first because converting the
305307
* OSS capabilities to the equivalent W3C capabilities isn't particularly easy, so it's hoped that
306308
* this approach gives us the most compatible implementation.
309+
*
310+
* @return The capabilities as a stream.
311+
* @throws IOException On file system I/O error.
307312
*/
308313
public Stream<Capabilities> stream() throws IOException {
309314
// OSS first

src/main/java/io/appium/java_client/screenrecording/CanRecordScreen.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,20 @@ public interface CanRecordScreen extends ExecutesMethod {
2929
/**
3030
* Start asynchronous screen recording process.
3131
*
32+
* @param <T> The platform-specific {@link BaseStartScreenRecordingOptions}
3233
* @param options see the documentation on the {@link BaseStartScreenRecordingOptions}
3334
* descendant for the particular platform.
35+
* @return `not used`.
3436
*/
37+
@SuppressWarnings("rawtypes")
3538
default <T extends BaseStartScreenRecordingOptions> String startRecordingScreen(T options) {
3639
return CommandExecutionHelper.execute(this, startRecordingScreenCommand(options));
3740
}
3841

3942
/**
4043
* Start asynchronous screen recording process with default options.
44+
*
45+
* @return `not used`.
4146
*/
4247
default String startRecordingScreen() {
4348
return this.execute(START_RECORDING_SCREEN).getValue().toString();
@@ -46,11 +51,13 @@ default String startRecordingScreen() {
4651
/**
4752
* Gather the output from the previously started screen recording to a media file.
4853
*
54+
* @param <T> The platform-specific {@link BaseStopScreenRecordingOptions}
4955
* @param options see the documentation on the {@link BaseStopScreenRecordingOptions}
5056
* descendant for the particular platform.
5157
* @return Base-64 encoded content of the recorded media file or an empty string
5258
* if the file has been successfully uploaded to a remote location (depends on the actual options).
5359
*/
60+
@SuppressWarnings("rawtypes")
5461
default <T extends BaseStopScreenRecordingOptions> String stopRecordingScreen(T options) {
5562
return CommandExecutionHelper.execute(this, stopRecordingScreenCommand(options));
5663
}

src/main/java/org/openqa/selenium/SearchContext.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,21 @@ public interface SearchContext {
2323
/**
2424
* Find all elements within the current context using the given mechanism.
2525
*
26+
* @param <T> The type of the resulting elements.
2627
* @param by The locating mechanism to use
2728
* @return A list of all {@link WebElement}s, or an empty list if nothing matches
2829
* @see org.openqa.selenium.By
2930
*/
30-
<T extends WebElement> List<T> findElements(By by);
31+
<T extends WebElement> List<T> findElements(By by);
3132

3233

3334
/**
3435
* Find the first {@link WebElement} using the given method.
3536
*
37+
* @param <T> The type of the resulting element.
3638
* @param by The locating mechanism
3739
* @return The first matching element on the current context
3840
* @throws NoSuchElementException If no matching elements are found
3941
*/
40-
<T extends WebElement> T findElement(By by);
42+
<T extends WebElement> T findElement(By by);
4143
}

0 commit comments

Comments
 (0)