Uploaded image for project: 'Magnolia Test Framework'
  1. Magnolia Test Framework
  2. MGNLTEST-148

MagnoliaHttpClient throws Nullpointer if user is null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 1.2.0
    • 1.1.0

    Description

      When using the Magnolia "builder" methods to set a path and an instance but keeping the user null, then public Request build() throws a Nullpointer.

       

      Example to reproduce

          @Test
          void serveResourceFromClasspath(MagnoliaHttpClient client) throws Exception {
              String resourcePath = "/.resources/test/classpath-test-resource.html";
      
              client.path(resourcePath).instance(DIRECT_AUTHOR);
              Request request = client.build();
              //Response response = client.get(request);
              // ... more stuff here
          }
      

      Expected: Request is build and can be used to get the response.

      Actual behaviour: client.build() throws a NullPointer.

       

      Unfortunately the recently released test-fwk 1.1.0 contains this bug.

       

       

       

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                cmeier Christoph Meier
                cmeier Christoph Meier
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - Not Specified
                      Not Specified
                      Logged:
                      Time Spent - 6.5h
                      6.5h