Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6682

NullpointerException in LinkBuilderImpl#getResolvedUri when only baseUri is set

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.4
    • Fix Version/s: 3.1.5
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The LinkBuilderImpl does not initialize its UriBuilder property with a non null value causing a NullPointerException if calling its `build` method after object construction.

      We have a testcase, which just calls baseUri followed by build. Previously we used Jersey as JAX-RS implementation where this test works. Looking at the code, Jersey initialises its property by just constructing their implementation of `UriBuilder`.

      I would assume, that changing the line

      private UriBuilder ub;
      

      to

      private UriBuilder ub = new UriBuilderImpl();
      

      would suffice.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sergey_beryozkin Sergey Beryozkin
                Reporter:
                cberg Christoph Berg
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: