Skip to content

Commit

Permalink
fix: Union name only in case of interface... abstract stays same
Browse files Browse the repository at this point in the history
  • Loading branch information
melistik committed May 7, 2023
1 parent 56aa5ec commit 06a4079
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected String checkAndAddUnionType(String name) {
if (name != null && !name.contains("<")) {
try {
Class clazz = Class.forName(name);
if ((clazz.isAnnotationPresent(JsonSubTypes.class) && clazz.isAnnotationPresent(JsonTypeInfo.class))) {
if ((clazz.isAnnotationPresent(JsonSubTypes.class) && clazz.isInterface() && clazz.isAnnotationPresent(JsonTypeInfo.class))) {
return name + "Union";
}
} catch (ClassNotFoundException cnf) {
Expand Down

0 comments on commit 06a4079

Please sign in to comment.