[
https://issues.apache.org/jira/browse/CAMEL-11264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16008369#comment-16008369
]
ASF GitHub Bot commented on CAMEL-11264:
----------------------------------------
GitHub user prashant2402 opened a pull request:
https://github.com/apache/camel/pull/1691
CAMEL-11264: Fixed potential NPE in DefaultUndertowHttpBinding
Please review the fix.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/prashant2402/camel master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1691.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1691
----
commit 087dc6490766d6676dd1ee58f265a1d19cbe1dd7
Author: Prasanth Pagolu <[email protected]>
Date: 2017-05-12T16:35:24Z
CAMEL-11264: Fixed potential NPE in DefaultUndertowHttpBinding
----
> Potential NPE in DefaultUndertowHttpBinding
> -------------------------------------------
>
> Key: CAMEL-11264
> URL: https://issues.apache.org/jira/browse/CAMEL-11264
> Project: Camel
> Issue Type: Bug
> Components: camel-undertow
> Affects Versions: 2.18.0, 2.18.1, 2.18.2, 2.18.3, 2.19.0
> Reporter: James Netherton
> Fix For: 2.18.4, 2.19.1, 2.20.0
>
>
> There's a potential NPE lurking in {{DefaultUndertowHttpBinding}}. We have
> this logic:
> {code:java}
> // we failed due to an exception so print it as plain text
> StringWriter sw = new StringWriter();
> PrintWriter pw = new PrintWriter(sw);
> exception.getCause().printStackTrace(pw);
> {code}
> Unfortuantely, {{exception.getCause()}} is not always guaranteed to be
> present and may be {{null}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)