From ef8e37dbd849fec1b656c5049328555d47bb0fc9 Mon Sep 17 00:00:00 2001 From: Phillip Kruger Date: Fri, 21 Aug 2020 13:22:02 +0200 Subject: [PATCH] Fix for #440:OpenAPIImpl.addSecurityRequirement does not assign created list to this.security Signed-off-by:Phillip Kruger --- .../main/java/io/smallrye/openapi/api/models/OpenAPIImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/io/smallrye/openapi/api/models/OpenAPIImpl.java b/core/src/main/java/io/smallrye/openapi/api/models/OpenAPIImpl.java index 6288ddf85..595ccd71b 100644 --- a/core/src/main/java/io/smallrye/openapi/api/models/OpenAPIImpl.java +++ b/core/src/main/java/io/smallrye/openapi/api/models/OpenAPIImpl.java @@ -130,7 +130,7 @@ public void setSecurity(List security) { */ @Override public OpenAPI addSecurityRequirement(SecurityRequirement securityRequirement) { - ModelUtil.add(securityRequirement, this.security, ArrayList::new); + this.security = ModelUtil.add(securityRequirement, this.security, ArrayList::new); return this; }