Skip to content

Commit f3af96e

Browse files
oschwaldclaude
andcommitted
Replace .equals("") with .isEmpty()
Use the more idiomatic String.isEmpty() method instead of comparing against an empty string literal. This expresses the intent more clearly and is the standard Java convention for empty string checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 0eb3d9a commit f3af96e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/maxmind/geoip2/WebServiceClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ private void handle4xxStatus(HttpResponse<InputStream> response)
413413
var uri = response.uri();
414414

415415
final var body = readBody(response);
416-
if (body.equals("")) {
416+
if (body.isEmpty()) {
417417
throw new HttpException("Received a " + status + " error for "
418418
+ uri + " with no body", status, uri);
419419
}

0 commit comments

Comments
 (0)