Skip to content

Commit 9f05464

Browse files
committed
fix sonar potential NPE
1 parent 0923826 commit 9f05464

File tree

1 file changed

+1
-1
lines changed
  • powertools-validation/src/main/java/software/amazon/lambda/powertools/validation/internal

1 file changed

+1
-1
lines changed

powertools-validation/src/main/java/software/amazon/lambda/powertools/validation/internal/ValidationAspect.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public Object around(ProceedingJoinPoint pjp,
190190
}
191191
}
192192

193-
if (validationNeeded && !validation.outboundSchema().isEmpty()) {
193+
if (result != null && validationNeeded && !validation.outboundSchema().isEmpty()) {
194194
JsonSchema outboundJsonSchema = getJsonSchema(validation.outboundSchema(), true);
195195

196196
Object overridenResponse = null;

0 commit comments

Comments
 (0)