File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
avro/src/main/java/com/fasterxml/jackson/dataformat/avro/schema Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,10 @@ public static Schema parseJsonSchema(String json) {
272272 public static Schema createEnumSchema (BeanDescription bean , List <String > values ,
273273 AnnotationIntrospector intr ) {
274274 final JavaType enumType = bean .getType ();
275- Enum <?> defaultEnumValue = intr .findDefaultEnumValue ((Class <Enum <?>>)(Class <?>) enumType .getRawClass ());
275+ @ SuppressWarnings ("unchecked" )
276+ Class <Enum <?>> rawEnumClass = (Class <Enum <?>>) enumType .getRawClass ();
277+ Enum <?> defaultEnumValue = intr .findDefaultEnumValue (bean .getClassInfo (),
278+ rawEnumClass .getEnumConstants ());
276279 return addAlias (Schema .createEnum (
277280 getName (enumType ),
278281 bean .findClassDescription (),
You can’t perform that action at this time.
0 commit comments