Skip to content

Commit 5b0c021

Browse files
authored
better null check in isExtensionParent (#15807)
1 parent 6788f43 commit 5b0c021

File tree

1 file changed

+1
-1
lines changed
  • modules/openapi-generator/src/main/java/org/openapitools/codegen/utils

1 file changed

+1
-1
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ private static boolean hasOrInheritsDiscriminator(Schema schema, Map<String, Sch
14491449
* @return boolean
14501450
*/
14511451
public static boolean isExtensionParent(Schema schema) {
1452-
if (schema.getExtensions() == null) {
1452+
if (schema == null || schema.getExtensions() == null) {
14531453
return false;
14541454
}
14551455

0 commit comments

Comments
 (0)