Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11264

Potential NPE in DefaultUndertowHttpBinding

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.18.0, 2.18.1, 2.18.2, 2.18.3, 2.19.0
    • Fix Version/s: 2.18.4, 2.19.1, 2.20.0
    • Component/s: camel-undertow
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      There's a potential NPE lurking in DefaultUndertowHttpBinding. We have this logic:

      // 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);
      

      Unfortuantely, exception.getCause() is not always guaranteed to be present and may be null.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                acosentino Andrea Cosentino
                Reporter:
                jamesnetherton James Netherton
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: