Use constant.equals()

There are some equals() that are not constant.equals(variable), but variable.equals(constant)
This commit is contained in:
AlexCai2019
2025-06-05 01:55:44 +08:00
parent 72a1a48173
commit e800cc349f
4 changed files with 13 additions and 17 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ public class JSONPointer {
if (pointer == null) {
throw new NullPointerException("pointer cannot be null");
}
if (pointer.isEmpty() || pointer.equals("#")) {
if (pointer.isEmpty() || "#".equals(pointer)) {
this.refTokens = Collections.emptyList();
return;
}