You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above code throws an IllegalStateException with message "Unlimited does not define 'max'. Please check 'isLimited' before attempting to read 'max'". It is caused by the incomplete equals method where this case is not handled (this: limited, that: unlimited).
Fix:
if (this.isUnlimited() && that.isUnlimited()) {
return true;
}
must be replaced with
if (that.isUnlimited()) {
return false;
}
(this.isUnlimited() is always false anyway)
u.i.: I found this in a unit test where multiple queries were mocked and the Query::equals called Limit::equals in the background, causing some tests fail.
The text was updated successfully, but these errors were encountered:
The above code throws an IllegalStateException with message "Unlimited does not define 'max'. Please check 'isLimited' before attempting to read 'max'". It is caused by the incomplete equals method where this case is not handled (this: limited, that: unlimited).
Fix:
must be replaced with
(this.isUnlimited() is always false anyway)
u.i.: I found this in a unit test where multiple queries were mocked and the Query::equals called Limit::equals in the background, causing some tests fail.
The text was updated successfully, but these errors were encountered: