private final Class<?> identifier;
private final String getterName;
- ValueContext(final Class<?> identifier, final LeafNodeCodecContext<?> leaf) {
+ ValueContext(final Class<?> identifier, final ValueNodeCodecContext leaf) {
getterName = leaf.getGetter().getName();
try {
getter = MethodHandles.publicLookup().unreflect(identifier.getMethod(getterName)).asType(OBJECT_METHOD);
value = getter.invokeExact(obj);
} catch (Throwable e) {
Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
+ throw new IllegalStateException(e);
}
Preconditions.checkArgument(value != null,