Skip to content

Commit 60a054b

Browse files
committed
[java] Formatting files
1 parent f03ba8c commit 60a054b

16 files changed

Lines changed: 76 additions & 92 deletions

java/src/org/openqa/selenium/edge/EdgeDriver.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.openqa.selenium.chromium.ChromiumDriver;
2424
import org.openqa.selenium.chromium.ChromiumDriverCommandExecutor;
2525
import org.openqa.selenium.internal.Require;
26-
import org.openqa.selenium.manager.SeleniumManagerOutput;
2726
import org.openqa.selenium.manager.SeleniumManagerOutput.Result;
2827
import org.openqa.selenium.remote.CommandInfo;
2928
import org.openqa.selenium.remote.RemoteWebDriver;

java/src/org/openqa/selenium/federatedcredentialmanagement/FederatedCredentialManagementAccount.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,21 @@ public class FederatedCredentialManagementAccount {
3333
private final String name;
3434
private final String givenName;
3535
private final String pictureUrl;
36+
3637
/**
3738
* The config URL of the identity provider that provided this account.
3839
*
39-
* This allows identifying the IDP in multi-IDP cases.
40+
* <p>This allows identifying the IDP in multi-IDP cases.
4041
*/
4142
private final String idpConfigUrl;
43+
4244
/**
4345
* The login state for this account.
4446
*
45-
* One of LOGIN_STATE_SIGNIN and LOGIN_STATE_SIGNUP.
47+
* <p>One of LOGIN_STATE_SIGNIN and LOGIN_STATE_SIGNUP.
4648
*/
4749
private final String loginState;
50+
4851
private final String termsOfServiceUrl;
4952
private final String privacyPolicyUrl;
5053

java/src/org/openqa/selenium/federatedcredentialmanagement/FederatedCredentialManagementDialog.java

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,41 +29,33 @@ public interface FederatedCredentialManagementDialog {
2929
String DIALOG_TYPE_ACCOUNT_LIST = "AccountChooser";
3030
String DIALOG_TYPE_AUTO_REAUTH = "AutoReauthn";
3131

32-
/**
33-
* Closes the dialog as if the user had clicked X.
34-
*/
32+
/** Closes the dialog as if the user had clicked X. */
3533
void cancelDialog();
3634

3735
/**
3836
* Selects an account as if the user had clicked on it.
3937
*
40-
* @param index The index of the account to select from the list
41-
* returned by getAccounts().
38+
* @param index The index of the account to select from the list returned by getAccounts().
4239
*/
4340
void selectAccount(int index);
4441

4542
/**
4643
* Returns the type of the open dialog.
4744
*
48-
* One of DIALOG_TYPE_ACCOUNT_LIST and DIALOG_TYPE_AUTO_REAUTH.
45+
* <p>One of DIALOG_TYPE_ACCOUNT_LIST and DIALOG_TYPE_AUTO_REAUTH.
4946
*/
50-
String getDialogType();
47+
String getDialogType();
5148

52-
/**
53-
* Returns the title of the dialog.
54-
*/
49+
/** Returns the title of the dialog. */
5550
String getTitle();
5651

57-
/**
58-
* Returns the subtitle of the dialog or null if none.
59-
*/
52+
/** Returns the subtitle of the dialog or null if none. */
6053
String getSubtitle();
6154

6255
/**
6356
* Returns the accounts shown in the account chooser.
6457
*
65-
* If this is an auto reauth dialog, returns the single account
66-
* that is being signed in.
58+
* <p>If this is an auto reauth dialog, returns the single account that is being signed in.
6759
*/
6860
List<FederatedCredentialManagementAccount> getAccounts();
6961
}

java/src/org/openqa/selenium/federatedcredentialmanagement/HasFederatedCredentialManagement.java

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,31 @@
1919

2020
import org.openqa.selenium.Beta;
2121

22-
/**
23-
* Used by classes to indicate that they can interact with FedCM dialogs.
24-
*/
22+
/** Used by classes to indicate that they can interact with FedCM dialogs. */
2523
@Beta
2624
public interface HasFederatedCredentialManagement {
2725
/**
2826
* Disables the promise rejection delay.
2927
*
30-
* FedCM by default delays promise resolution in failure cases for privacy
31-
* reasons (https://fedidcg.github.io/FedCM/#ref-for-setdelayenabled);
32-
* this function allows turning it off to let tests run faster where this
33-
* is not relevant.
28+
* <p>FedCM by default delays promise resolution in failure cases for privacy reasons
29+
* (https://fedidcg.github.io/FedCM/#ref-for-setdelayenabled); this function allows turning it off
30+
* to let tests run faster where this is not relevant.
3431
*/
3532
void setDelayEnabled(boolean enabled);
3633

3734
/**
3835
* Resets the FedCM dialog cooldown.
3936
*
40-
* If a user agent triggers a cooldown when the account chooser is dismissed,
41-
* this function resets that cooldown so that the dialog can be triggered
42-
* again immediately.
37+
* <p>If a user agent triggers a cooldown when the account chooser is dismissed, this function
38+
* resets that cooldown so that the dialog can be triggered again immediately.
4339
*/
4440
void resetCooldown();
4541

4642
/**
4743
* Gets the currently open FedCM dialog, or null if there is no dialog.
4844
*
49-
* Can be used with WebDriverWait like:
50-
* wait.until(driver -> ((HasFederatedCredentialManagement) driver).
51-
* getFederatedCredentialManagementDialog() != null);
45+
* <p>Can be used with WebDriverWait like: wait.until(driver ->
46+
* ((HasFederatedCredentialManagement) driver). getFederatedCredentialManagementDialog() != null);
5247
*/
5348
FederatedCredentialManagementDialog getFederatedCredentialManagementDialog();
5449
}
55-

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import org.openqa.selenium.html5.SessionStorage;
5151
import org.openqa.selenium.html5.WebStorage;
5252
import org.openqa.selenium.internal.Require;
53-
import org.openqa.selenium.manager.SeleniumManagerOutput;
5453
import org.openqa.selenium.manager.SeleniumManagerOutput.Result;
5554
import org.openqa.selenium.remote.CommandInfo;
5655
import org.openqa.selenium.remote.FileDetector;

java/src/org/openqa/selenium/grid/node/config/DriverServiceSessionFactory.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,21 +341,21 @@ private String getHost() {
341341

342342
private Capabilities setBrowserBinary(Capabilities options, String browserPath) {
343343
List<String> vendorOptionsCapabilities =
344-
Arrays.asList("moz:firefoxOptions", "goog:chromeOptions", "ms:edgeOptions");
344+
Arrays.asList("moz:firefoxOptions", "goog:chromeOptions", "ms:edgeOptions");
345345
for (String vendorOptionsCapability : vendorOptionsCapabilities) {
346346
if (options.asMap().containsKey(vendorOptionsCapability)) {
347347
try {
348348
@SuppressWarnings("unchecked")
349349
Map<String, Object> vendorOptions =
350-
(Map<String, Object>) options.getCapability(vendorOptionsCapability);
350+
(Map<String, Object>) options.getCapability(vendorOptionsCapability);
351351
vendorOptions.put("binary", browserPath);
352352
return new PersistentCapabilities(options)
353-
.setCapability(vendorOptionsCapability, vendorOptions);
353+
.setCapability(vendorOptionsCapability, vendorOptions);
354354
} catch (Exception e) {
355355
LOG.warning(
356-
String.format(
357-
"Exception while setting the browser binary path. %s: %s",
358-
options, e.getMessage()));
356+
String.format(
357+
"Exception while setting the browser binary path. %s: %s",
358+
options, e.getMessage()));
359359
}
360360
}
361361
}

java/src/org/openqa/selenium/grid/web/ResourceHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import static com.google.common.net.MediaType.GIF;
2323
import static com.google.common.net.MediaType.HTML_UTF_8;
2424
import static com.google.common.net.MediaType.JAVASCRIPT_UTF_8;
25-
import static com.google.common.net.MediaType.JSON_UTF_8;
2625
import static com.google.common.net.MediaType.JPEG;
26+
import static com.google.common.net.MediaType.JSON_UTF_8;
2727
import static com.google.common.net.MediaType.OCTET_STREAM;
2828
import static com.google.common.net.MediaType.PLAIN_TEXT_UTF_8;
2929
import static com.google.common.net.MediaType.PNG;

java/src/org/openqa/selenium/manager/SeleniumManagerOutput.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
// under the License.
1717
package org.openqa.selenium.manager;
1818

19-
import org.openqa.selenium.json.JsonInput;
20-
2119
import java.util.List;
20+
import org.openqa.selenium.json.JsonInput;
2221

2322
public class SeleniumManagerOutput {
2423

java/src/org/openqa/selenium/remote/DriverCommand.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,10 @@ static CommandPayload SET_CURRENT_WINDOW_SIZE(Dimension targetSize) {
412412
}
413413

414414
static CommandPayload SELECT_ACCOUNT(int index) {
415-
return new CommandPayload(
416-
SELECT_ACCOUNT, ImmutableMap.of("accountIndex", index));
415+
return new CommandPayload(SELECT_ACCOUNT, ImmutableMap.of("accountIndex", index));
417416
}
418417

419418
static CommandPayload SET_DELAY_ENABLED(boolean enabled) {
420-
return new CommandPayload(
421-
SET_DELAY_ENABLED, ImmutableMap.of("enabled", enabled));
419+
return new CommandPayload(SET_DELAY_ENABLED, ImmutableMap.of("enabled", enabled));
422420
}
423421
}

java/src/org/openqa/selenium/remote/FedCmDialogImpl.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@
1717

1818
package org.openqa.selenium.remote;
1919

20+
import com.google.common.collect.ImmutableMap;
2021
import java.util.ArrayList;
2122
import java.util.List;
2223
import java.util.Map;
23-
24-
import com.google.common.collect.ImmutableMap;
2524
import org.openqa.selenium.federatedcredentialmanagement.FederatedCredentialManagementAccount;
2625
import org.openqa.selenium.federatedcredentialmanagement.FederatedCredentialManagementDialog;
27-
import org.openqa.selenium.remote.DriverCommand;
28-
import org.openqa.selenium.remote.ExecuteMethod;
2926

3027
class FedCmDialogImpl implements FederatedCredentialManagementDialog {
3128
private final ExecuteMethod executeMethod;
@@ -51,20 +48,24 @@ public String getDialogType() {
5148

5249
@Override
5350
public String getTitle() {
54-
Map<String, Object> result = (Map<String, Object>) executeMethod.execute(DriverCommand.GET_FEDCM_TITLE, null);
51+
Map<String, Object> result =
52+
(Map<String, Object>) executeMethod.execute(DriverCommand.GET_FEDCM_TITLE, null);
5553
return (String) result.getOrDefault("title", null);
5654
}
5755

5856
@Override
5957
public String getSubtitle() {
60-
Map<String, Object> result = (Map<String, Object>) executeMethod.execute(DriverCommand.GET_FEDCM_TITLE, null);
58+
Map<String, Object> result =
59+
(Map<String, Object>) executeMethod.execute(DriverCommand.GET_FEDCM_TITLE, null);
6160
return (String) result.getOrDefault("subtitle", null);
6261
}
6362

6463
@Override
6564
public List<FederatedCredentialManagementAccount> getAccounts() {
66-
List<Map<String, String>> list = (List<Map<String, String>>) executeMethod.execute(DriverCommand.GET_ACCOUNTS, null);
67-
ArrayList<FederatedCredentialManagementAccount> accounts = new ArrayList<FederatedCredentialManagementAccount>();
65+
List<Map<String, String>> list =
66+
(List<Map<String, String>>) executeMethod.execute(DriverCommand.GET_ACCOUNTS, null);
67+
ArrayList<FederatedCredentialManagementAccount> accounts =
68+
new ArrayList<FederatedCredentialManagementAccount>();
6869
for (Map<String, String> map : list) {
6970
accounts.add(new FederatedCredentialManagementAccount(map));
7071
}

0 commit comments

Comments
 (0)