Skip to content

Commit

Permalink
Declare private, constant list as ImmutableList.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
juangj committed May 24, 2017
1 parent a09303d commit f55ce52
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@
package org.openqa.selenium.chrome;

import com.google.common.collect.ImmutableMap;

import org.openqa.selenium.remote.CommandInfo;
import org.openqa.selenium.remote.http.HttpMethod;
import org.openqa.selenium.remote.service.DriverCommandExecutor;
import org.openqa.selenium.remote.service.DriverService;

import java.util.Map;

/**
* {@link DriverCommandExecutor} that understands ChromeDriver specific commands.
*/
class ChromeDriverCommandExecutor extends DriverCommandExecutor {

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

Expand Down

0 comments on commit f55ce52

Please sign in to comment.