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

NullpointerException in LinkBuilderImpl#getResolvedUri when only baseUri is set

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.4
    • 3.1.5
    • JAX-RS
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment