Skip to content

Commit

Permalink
prevent NPE when WebAppException#getResponse returns null
Browse files Browse the repository at this point in the history
Signed-off-by: jansupol <jan.supol@oracle.com>
  • Loading branch information
jansupol authored and senivam committed Jan 3, 2024
1 parent c3d3132 commit ed25486
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -526,7 +526,7 @@ private Response mapException(final Throwable originalThrowable) throws Throwabl
processingContext.routingContext().setMappedThrowable(throwable);

waeResponse = webApplicationException.getResponse();
if (waeResponse.hasEntity()) {
if (waeResponse != null && waeResponse.hasEntity()) {
LOGGER.log(Level.FINE, LocalizationMessages
.EXCEPTION_MAPPING_WAE_ENTITY(waeResponse.getStatus()), throwable);
return waeResponse;
Expand Down

0 comments on commit ed25486

Please sign in to comment.