jersey
  1. jersey
  2. JERSEY-1194

Client#target throws incorrect exceptions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-m04
    • Fix Version/s: 2.0-m06, 2.0
    • Component/s: core
    • Labels:
      None

      Description

      Client#target(String) and Client#target(Uri) do not throw NullPointerException for null value, unlike what's stated in javadoc, but IllegalArgumentException.

        Activity

        Hide
        Martin Matula added a comment -

        It is natural to use UriBuilder underneath the target. Seems UriBuilder and WebTarget are not consistent in what exceptions they are throwing. So instead of fixing this in Jersey (rethrowing a different exception than what comes from UriBuilder, or adding another check for null), maybe it would be better to sync up WebTarget javadoc with UriBuilder. Assigning to Marek for consideration (note I already redirected another WebTarget javadoc-related bug to JAX-RS - see http://java.net/jira/browse/JAX_RS_SPEC-237).

        Show
        Martin Matula added a comment - It is natural to use UriBuilder underneath the target. Seems UriBuilder and WebTarget are not consistent in what exceptions they are throwing. So instead of fixing this in Jersey (rethrowing a different exception than what comes from UriBuilder, or adding another check for null), maybe it would be better to sync up WebTarget javadoc with UriBuilder. Assigning to Marek for consideration (note I already redirected another WebTarget javadoc-related bug to JAX-RS - see http://java.net/jira/browse/JAX_RS_SPEC-237 ).

          People

          • Assignee:
            Marek Potociar
            Reporter:
            jan.supol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 30 minutes
              30m