Fixed NewIsland.Builder#reason() logic (thanks to the unit tests)

This commit is contained in:
Florian CUNY 2019-12-23 15:19:28 +01:00
parent 48f898aa2c
commit a807918105
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ public class NewIsland {
* @param reason reason, can only be {@link Reason#CREATE} or {@link Reason#RESET}.
*/
public Builder reason(Reason reason) {
if (!reason.equals(Reason.CREATE) || !reason.equals(Reason.RESET)) {
if (!reason.equals(Reason.CREATE) && !reason.equals(Reason.RESET)) {
throw new IllegalArgumentException("Reason must be CREATE or RESET.");
}
this.reason2 = reason;