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

Potential NPE in CamelEndpointDetails.hashCode method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.22.0
    • Fix Version/s: 2.22.1, 2.23.0
    • Component/s: tooling
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      in case className is null, there is an NPE

       

      java.lang.NullPointerException
      at org.apache.camel.parser.model.CamelEndpointDetails.hashCode(CamelEndpointDetails.java:153)
      at java.util.HashMap.hash(HashMap.java:338)
      at java.util.HashMap.put(HashMap.java:611)
      at com.github.cameltooling.lsp.internal.CamelTextDocumentService.didSave(CamelTextDocumentService.java:223)

      it is also possible with endpointURi but i think that endpointURi is always not null (but maybe worth checking for non null in hashCode method

        Attachments

          Activity

            People

            • Assignee:
              onders Onder Sezgin
              Reporter:
              apupier Aurélien Pupier
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: