BAEL-2074: IllegalArgumentException -> IllegalStateException

This commit is contained in:
Paul van Gool 2018-10-30 14:32:09 -07:00
parent 4f84edd07a
commit c486b975a5
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ public class Message {
private void verifyTextOrFile() {
if (text != null && file != null) {
throw new IllegalArgumentException("Cannot send 'text' and 'file'.");
throw new IllegalStateException("Cannot send 'text' and 'file'.");
}
}
}

View File

@ -24,7 +24,7 @@ public class BuilderWithCustomSetterUnitTest {
.build();
}
@Test(expected = IllegalArgumentException.class)
@Test(expected = IllegalStateException.class)
public void givenBuilderWithCustomSetter_TestTextAndFile() {
Message message = Message.builder()
.sender("user@somedomain.com")