This is an automated email from the ASF dual-hosted git repository.

Lukas-Finster pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 6e6ef3a03432c15ccbed6995f7d734acc993f157
Author: Lukas Finster <[email protected]>
AuthorDate: Wed Aug 5 11:43:59 2026 +0200

    Fixed: Added guard against npe in OpenApiUtil
---
 .../src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java        | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java 
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
index 694ad507ee..da9588f134 100644
--- 
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
+++ 
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
@@ -351,6 +351,10 @@ public final class OpenApiUtil {
     @SuppressWarnings("deprecation")
     public static Schema<?> getAttributeSchema(ModelService service, 
ModelParam param) {
         Schema<?> schema = null;
+        if (param == null) {
+            Debug.logWarning("ModelParam is null - ignored.", MODULE);
+            return null;
+        }
         Class<?> schemaClass = getOpenApiTypeForAttributeType(param.getType());
         if (schemaClass == null) {
             Debug.logWarning("Attribute '" + param.getName() + "' ignored as 
it is declared as '" + param.getType()

Reply via email to