File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
modules/swagger-core/src/main/java/io/swagger/v3/core/jackson Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1128,13 +1128,16 @@ private Stream<Annotation> getRecordComponentAnnotations(BeanPropertyDefinition
11281128
11291129 private Boolean isRecordType (BeanPropertyDefinition propDef ){
11301130 try {
1131- Class <?> clazz = propDef .getPrimaryMember ().getDeclaringClass ();
1132- Method isRecordMethod = Class .class .getMethod ("isRecord" );
1133- return (Boolean ) isRecordMethod .invoke (clazz );
1131+ if (propDef .getPrimaryMember () != null ) {
1132+ Class <?> clazz = propDef .getPrimaryMember ().getDeclaringClass ();
1133+ Method isRecordMethod = Class .class .getMethod ("isRecord" );
1134+ return (Boolean ) isRecordMethod .invoke (clazz );
1135+ } else {
1136+ return false ;
1137+ }
11341138 } catch (NoSuchMethodException e ) {
11351139 return false ;
11361140 } catch (Exception e ) {
1137- e .printStackTrace ();
11381141 return false ;
11391142 }
11401143 }
You can’t perform that action at this time.
0 commit comments