Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Delta456 committed Jan 15, 2025
1 parent 3516821 commit c457bd8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions java/src/org/openqa/selenium/remote/RemoteWebDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
}
Expand Down Expand Up @@ -929,9 +930,9 @@ public Set<Cookie> 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<Cookie> allCookies = getCookies();
for (Cookie cookie : allCookies) {
Expand Down

0 comments on commit c457bd8

Please sign in to comment.