Skip to content

Commit

Permalink
fix(bucket): in the event of a negative bucket, just return null
Browse files Browse the repository at this point in the history
  • Loading branch information
seailz committed Nov 11, 2024
1 parent 5bdbb16 commit dec8d1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/seailz/discordjar/DiscordJar.java
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ public Bucket getBucketForUrl(String url) {
for (Bucket bucket : buckets) {
List<String> affectedRoutes = bucket.getAffectedRoutes();
if (affectedRoutes == null) continue;
if (bucket == null) continue;

Check warning on line 420 in src/main/java/com/seailz/discordjar/DiscordJar.java

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Constant values

Condition `bucket == null` is always `false`
if (affectedRoutes.contains(url)) return bucket;
}
return null;
Expand Down

0 comments on commit dec8d1a

Please sign in to comment.