Skip to content

Commit eb89dee

Browse files
Resolve warning: Instead of toString() use this.
1 parent 87cffaf commit eb89dee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

objectbox-java/src/main/java/io/objectbox/Property.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ public int getEntityId() {
666666
@Internal
667667
public int getId() {
668668
if (this.id <= 0) {
669-
throw new IllegalStateException("Illegal property ID " + id + " for " + toString());
669+
throw new IllegalStateException("Illegal property ID " + id + " for " + this);
670670
}
671671
return id;
672672
}
@@ -677,10 +677,10 @@ boolean isIdVerified() {
677677

678678
void verifyId(int idInDb) {
679679
if (this.id <= 0) {
680-
throw new IllegalStateException("Illegal property ID " + id + " for " + toString());
680+
throw new IllegalStateException("Illegal property ID " + id + " for " + this);
681681
}
682682
if (this.id != idInDb) {
683-
throw new DbException(toString() + " does not match ID in DB: " + idInDb);
683+
throw new DbException(this + " does not match ID in DB: " + idInDb);
684684
}
685685
idVerified = true;
686686
}

0 commit comments

Comments
 (0)