From c457bd85138fe4c7527897bb22f28e3d36354dd6 Mon Sep 17 00:00:00 2001 From: delta456 Date: Wed, 15 Jan 2025 16:16:01 +0530 Subject: [PATCH] format --- java/src/org/openqa/selenium/remote/RemoteWebDriver.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/java/src/org/openqa/selenium/remote/RemoteWebDriver.java b/java/src/org/openqa/selenium/remote/RemoteWebDriver.java index 1035793469288..47400ea837bb0 100644 --- a/java/src/org/openqa/selenium/remote/RemoteWebDriver.java +++ b/java/src/org/openqa/selenium/remote/RemoteWebDriver.java @@ -22,6 +22,7 @@ import static java.util.logging.Level.SEVERE; import static org.openqa.selenium.remote.CapabilityType.PLATFORM_NAME; +import com.github.javaparser.quality.NotNull; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; @@ -868,9 +869,9 @@ public void addCookie(Cookie cookie) { } @Override - public void deleteCookieNamed(String name) { + public void deleteCookieNamed(@NotNull String name) { if (name.isEmpty() || name.equals(" ")) { - throw new IllegalArgumentException("Cookie name cannot be empty or null"); + throw new IllegalArgumentException("Cookie name cannot be empty"); } execute(DriverCommand.DELETE_COOKIE(name)); } @@ -929,9 +930,9 @@ public Set getCookies() { } @Override - public Cookie getCookieNamed(String name) { + public Cookie getCookieNamed(@NotNull String name) { if (name.isEmpty() || name.equals(" ")) { - throw new IllegalArgumentException("Cookie name cannot be empty or null"); + throw new IllegalArgumentException("Cookie name cannot be empty"); } Set allCookies = getCookies(); for (Cookie cookie : allCookies) {