Skip to content

Commit f55ce52

Browse files
committed
Declare private, constant list as ImmutableList.
The theory is that it's safer. The field is intended to be immutable, so accidental attempts to mutate it will be compile errors rather than runtime errors.
1 parent a09303d commit f55ce52

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

java/client/src/org/openqa/selenium/chrome/ChromeDriverCommandExecutor.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,17 @@
1818
package org.openqa.selenium.chrome;
1919

2020
import com.google.common.collect.ImmutableMap;
21-
2221
import org.openqa.selenium.remote.CommandInfo;
2322
import org.openqa.selenium.remote.http.HttpMethod;
2423
import org.openqa.selenium.remote.service.DriverCommandExecutor;
2524
import org.openqa.selenium.remote.service.DriverService;
2625

27-
import java.util.Map;
28-
2926
/**
3027
* {@link DriverCommandExecutor} that understands ChromeDriver specific commands.
3128
*/
3229
class ChromeDriverCommandExecutor extends DriverCommandExecutor {
3330

34-
private static final Map<String, CommandInfo> CHROME_COMMAND_NAME_TO_URL = ImmutableMap.of(
31+
private static final ImmutableMap<String, CommandInfo> CHROME_COMMAND_NAME_TO_URL = ImmutableMap.of(
3532
ChromeDriverCommand.LAUNCH_APP,
3633
new CommandInfo("/session/:sessionId/chromium/launch_app", HttpMethod.POST));
3734

0 commit comments

Comments
 (0)