From 3d8c6fa7a950ce129f4bd8fb347c71a2cdd4bf07 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Wed, 26 Apr 2023 11:30:38 +0200 Subject: [PATCH] [java] Remove deprecated "platform" JWP capability --- java/src/org/openqa/selenium/Capabilities.java | 2 +- .../org/openqa/selenium/grid/data/DefaultSlotMatcher.java | 2 +- java/src/org/openqa/selenium/remote/CapabilityType.java | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/java/src/org/openqa/selenium/Capabilities.java b/java/src/org/openqa/selenium/Capabilities.java index 43db800b08a95..77a3268bdfc58 100644 --- a/java/src/org/openqa/selenium/Capabilities.java +++ b/java/src/org/openqa/selenium/Capabilities.java @@ -35,7 +35,7 @@ default String getBrowserName() { } default Platform getPlatformName() { - return Stream.of("platform", "platformName") + return Stream.of("platformName") .map(this::getCapability) .filter(Objects::nonNull) .map(cap -> { diff --git a/java/src/org/openqa/selenium/grid/data/DefaultSlotMatcher.java b/java/src/org/openqa/selenium/grid/data/DefaultSlotMatcher.java index 56b00bee09e63..27ec3c3fa0f8c 100644 --- a/java/src/org/openqa/selenium/grid/data/DefaultSlotMatcher.java +++ b/java/src/org/openqa/selenium/grid/data/DefaultSlotMatcher.java @@ -96,7 +96,7 @@ private Boolean initialMatch(Capabilities stereotype, Capabilities capabilities) // Matching of extension capabilities is implementation independent. Skip them .filter(name -> !name.contains(":")) // Platform matching is special, we do it later - .filter(name -> !"platform".equalsIgnoreCase(name) && !"platformName".equalsIgnoreCase(name)) + .filter(name -> !"platformName".equalsIgnoreCase(name)) .map(name -> { if (capabilities.getCapability(name) instanceof String) { return stereotype.getCapability(name).toString() diff --git a/java/src/org/openqa/selenium/remote/CapabilityType.java b/java/src/org/openqa/selenium/remote/CapabilityType.java index 96c7f3fee80ae..eea4fa0202b33 100644 --- a/java/src/org/openqa/selenium/remote/CapabilityType.java +++ b/java/src/org/openqa/selenium/remote/CapabilityType.java @@ -22,11 +22,6 @@ */ public interface CapabilityType { - /** - * @deprecated Use {@link CapabilityType#PLATFORM_NAME} - */ - @Deprecated - String PLATFORM = "platform"; /** * @deprecated Non W3C compliant */