jsouper icon indicating copy to clipboard operation
jsouper copied to clipboard

AutoValue abstract class problem

Open dominikmicuta opened this issue 8 years ago • 0 comments

In implementation of ClassElementAdapter there is a check for

if (Modifier.isAbstract(rawType.getModifiers())) {
    throw new IllegalArgumentException("Cannot serialize abstract class " + rawType.getName());
}

is this necessary? Autovalue model with SoupAdapter annotation is throwing exception.

Unless correct adapter is provided by SoupAdapter Annotation than this should be handled by user. Also interfaces dont make sence until user define correct adapter. Or am I missing something?

Manual creation with Jsouper.Builder is working fine for our abstract model classes.

dominikmicuta avatar Dec 06 '16 20:12 dominikmicuta