From cdd75fcda8507e39d44785ff16dd5a95c9ec45d2 Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Tue, 10 Oct 2023 16:24:23 +0530 Subject: [PATCH] [java] Use Java Map instead of Guava Immutable Map in Chrome package --- java/src/org/openqa/selenium/chrome/AddHasCasting.java | 3 +-- java/src/org/openqa/selenium/chrome/AddHasCdp.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/java/src/org/openqa/selenium/chrome/AddHasCasting.java b/java/src/org/openqa/selenium/chrome/AddHasCasting.java index 1921686e5c243..157b8c312e2a3 100644 --- a/java/src/org/openqa/selenium/chrome/AddHasCasting.java +++ b/java/src/org/openqa/selenium/chrome/AddHasCasting.java @@ -20,7 +20,6 @@ import static org.openqa.selenium.remote.Browser.CHROME; import com.google.auto.service.AutoService; -import com.google.common.collect.ImmutableMap; import java.util.Map; import java.util.function.Predicate; import org.openqa.selenium.Capabilities; @@ -35,7 +34,7 @@ public class AddHasCasting extends org.openqa.selenium.chromium.AddHasCasting { @Override public Map getAdditionalCommands() { - return ImmutableMap.of( + return Map.of( GET_CAST_SINKS, new CommandInfo("session/:sessionId/goog/cast/get_sinks", HttpMethod.GET), SET_CAST_SINK_TO_USE, new CommandInfo("session/:sessionId/goog/cast/set_sink_to_use", HttpMethod.POST), diff --git a/java/src/org/openqa/selenium/chrome/AddHasCdp.java b/java/src/org/openqa/selenium/chrome/AddHasCdp.java index 28eec2cfa1924..ffb49e583826d 100644 --- a/java/src/org/openqa/selenium/chrome/AddHasCdp.java +++ b/java/src/org/openqa/selenium/chrome/AddHasCdp.java @@ -20,7 +20,6 @@ import static org.openqa.selenium.remote.Browser.CHROME; import com.google.auto.service.AutoService; -import com.google.common.collect.ImmutableMap; import java.util.Map; import java.util.function.Predicate; import org.openqa.selenium.Capabilities; @@ -35,7 +34,7 @@ public class AddHasCdp extends org.openqa.selenium.chromium.AddHasCdp { @Override public Map getAdditionalCommands() { - return ImmutableMap.of( + return Map.of( EXECUTE_CDP, new CommandInfo("session/:sessionId/goog/cdp/execute", HttpMethod.POST)); }