Now it's not clear that IllegalStateException would be called on checkNotDefault().
The user expects IllegalArgumentException.
We need to have checkNotDefault(), which throws IAE, and checkNotDefaultState().
Similarly, we need to have checkDefault() and checkDefaultState().
Now it's not clear that
IllegalStateExceptionwould be called oncheckNotDefault().The user expects
IllegalArgumentException.We need to have
checkNotDefault(), which throws IAE, andcheckNotDefaultState().Similarly, we need to have
checkDefault()andcheckDefaultState().