From 2b32dbd572535de7434518667507180b83bf61e2 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Wed, 26 Jun 2024 15:04:34 +0200 Subject: [PATCH] [java] Removing `LocateNodeParameters.Builder`, deprecated since 4.20 --- .../browsingcontext/LocateNodeParameters.java | 53 ------------------- 1 file changed, 53 deletions(-) diff --git a/java/src/org/openqa/selenium/bidi/browsingcontext/LocateNodeParameters.java b/java/src/org/openqa/selenium/bidi/browsingcontext/LocateNodeParameters.java index d6a87e3fbe021..1a68f879d60bb 100644 --- a/java/src/org/openqa/selenium/bidi/browsingcontext/LocateNodeParameters.java +++ b/java/src/org/openqa/selenium/bidi/browsingcontext/LocateNodeParameters.java @@ -23,26 +23,16 @@ import java.util.Map; import java.util.Optional; import org.openqa.selenium.bidi.script.RemoteReference; -import org.openqa.selenium.bidi.script.ResultOwnership; import org.openqa.selenium.bidi.script.SerializationOptions; public class LocateNodeParameters { private final Locator locator; private Optional maxNodeCount = Optional.empty(); - private Optional ownership = Optional.empty(); private Optional sandbox = Optional.empty(); private Optional serializationOptions = Optional.empty(); private Optional> startNodes = Optional.empty(); - private LocateNodeParameters(Builder builder) { - this.locator = builder.locator; - this.maxNodeCount = Optional.ofNullable(builder.maxNodeCount); - this.sandbox = Optional.ofNullable(builder.sandbox); - this.serializationOptions = Optional.ofNullable(builder.serializationOptions); - this.startNodes = Optional.ofNullable(builder.startNodes); - } - public LocateNodeParameters(Locator locator) { this.locator = locator; } @@ -83,47 +73,4 @@ public Map toMap() { return map; } - - /** - * @deprecated Use the chaining of LocateNodeParameters methods to add optional parameters. This - * is in favor of keeping the usage pattern consistent for BiDi parameters. Use the {@link - * LocateNodeParameters#LocateNodeParameters(Locator locator)} constructor and chain methods. - */ - @Deprecated(since = "4.20", forRemoval = true) - public static class Builder { - - private final Locator locator; - private Long maxNodeCount = null; - private String sandbox; - private SerializationOptions serializationOptions; - private List startNodes; - - public Builder(Locator locator) { - this.locator = locator; - } - - public Builder setMaxNodeCount(long maxNodeCount) { - this.maxNodeCount = maxNodeCount; - return this; - } - - public Builder setSandbox(String sandbox) { - this.sandbox = sandbox; - return this; - } - - public Builder setSerializationOptions(SerializationOptions options) { - this.serializationOptions = options; - return this; - } - - public Builder setStartNodes(List startNodes) { - this.startNodes = startNodes; - return this; - } - - public LocateNodeParameters build() { - return new LocateNodeParameters(this); - } - } }