From 0c190743530dc587873b1bc8e4873b22d91f468e Mon Sep 17 00:00:00 2001 From: AlanRoth Date: Tue, 2 Mar 2021 18:07:19 +0000 Subject: [PATCH] Added neccessery nullcheck --- .../openapi/impl/processor/ApplicationProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appserver/payara-appserver-modules/microprofile/openapi/src/main/java/fish/payara/microprofile/openapi/impl/processor/ApplicationProcessor.java b/appserver/payara-appserver-modules/microprofile/openapi/src/main/java/fish/payara/microprofile/openapi/impl/processor/ApplicationProcessor.java index 553b8a45929..c46afc08d42 100644 --- a/appserver/payara-appserver-modules/microprofile/openapi/src/main/java/fish/payara/microprofile/openapi/impl/processor/ApplicationProcessor.java +++ b/appserver/payara-appserver-modules/microprofile/openapi/src/main/java/fish/payara/microprofile/openapi/impl/processor/ApplicationProcessor.java @@ -538,7 +538,7 @@ private void vistEnumClass(AnnotationModel schemaAnnotation, EnumType enumType, if (schema != null) { SchemaImpl.merge(schema, newSchema, true, context); } - if (schema == null || schema.getEnumeration().isEmpty()) { + if (schema == null || schema.getEnumeration() == null || schema.getEnumeration().isEmpty()) { //if the schema annotation does not specify enums, then all enum fields will be added for (FieldModel enumField : enumType.getStaticFields()) { final String enumValue = enumField.getName();