Preconditions.checkState() now throws IllegalStateException instead of IllegalArgumentException. This will potentiallly break backwards compatibility.
Removed unhelpful message while constructing exceptions.
This commit is contained in:
parent
52288d7127
commit
4e4f9b3a69
@ -36,13 +36,13 @@ final class Preconditions {
|
||||
|
||||
public static void checkArgument(boolean condition) {
|
||||
if (!condition) {
|
||||
throw new IllegalArgumentException("condition failed: " + condition);
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkState(boolean condition) {
|
||||
if (!condition) {
|
||||
throw new IllegalArgumentException("condition failed: " + condition);
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user