Skip to content

Commit

Permalink
Fix possible NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Aug 12, 2024
1 parent 64bfad0 commit 97c4c62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/fabricmc/loom/util/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package net.fabricmc.loom.util;

import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -94,7 +95,7 @@ public boolean equals(Object obj) {
} else {
Version other = (Version) obj;
return this.major == other.major && this.minor == other.minor && this.micro == other.micro && this.patch == other.patch
&& this.toLowerCase(this.qualifier).equals(this.toLowerCase(other.qualifier));
&& Objects.equals(this.toLowerCase(this.qualifier), this.toLowerCase(other.qualifier));
}
}

Expand Down

0 comments on commit 97c4c62

Please sign in to comment.