Skip to content

Commit

Permalink
make specified exception extend exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ldriscoll committed Sep 17, 2015
1 parent d7b4721 commit af0b066
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -171,7 +171,7 @@ public Class<? extends Annotation>[] additionalJsonAnnotations() {
}

@Override
public Class<? extends RuntimeException> throwForInvalidImmutableState() {
public Class<? extends Exception> throwForInvalidImmutableState() {
throw new UnsupportedOperationException("Use StyleInfo.throwForInvalidImmutableStateName() instead");
};

Expand Down
Expand Up @@ -141,7 +141,7 @@ private ValueMirrors() {}

boolean privateNoargConstructor() default false;

Class<? extends RuntimeException> throwForInvalidImmutableState() default IllegalStateException.class;
Class<? extends Exception> throwForInvalidImmutableState() default IllegalStateException.class;

public enum ImplementationVisibility {
PUBLIC,
Expand Down
2 changes: 1 addition & 1 deletion value/src/org/immutables/value/Value.java
Expand Up @@ -609,7 +609,7 @@
* Exception to throw when an immutable object is in an invalid state. The Throwable must have
* a constructor that takes a single string
*/
Class<? extends RuntimeException> throwForInvalidImmutableState() default IllegalStateException.class;
Class<? extends Exception> throwForInvalidImmutableState() default IllegalStateException.class;

/**
* If implementation visibility is more restrictive than visibility of abstract value type, then
Expand Down

0 comments on commit af0b066

Please sign in to comment.