Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4047

WebClientInfo causes NullPointerException when the request header "User-Agent" is null.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.5.1
    • Component/s: wicket
    • Labels:
    • Environment:
      Windows 7, Jetty 6.1.26, Wicket 1.5.0.

      Description

      When the value of request header "User-Agent" is null, the class UserAgent tries to match UserAgent.INTERNET_EXPLORER against null, which results in a NullPointerException (UserAgent.java:90 and UserAgent.java:102).

      The function matches(String) of class UserAgent should check for null values.

        Activity

        Hide
        hielkehoeve Hielke Hoeve added a comment -

        Related to WICKET-475, however the NPE is now thrown further down the stack.

        Show
        hielkehoeve Hielke Hoeve added a comment - Related to WICKET-475 , however the NPE is now thrown further down the stack.
        Hide
        hielkehoeve Hielke Hoeve added a comment -

        an if check should solve the NPE.

        Show
        hielkehoeve Hielke Hoeve added a comment - an if check should solve the NPE.

          People

          • Assignee:
            ivaynberg Igor Vaynberg
            Reporter:
            hielkehoeve Hielke Hoeve
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

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

                Development