jersey
  1. jersey
  2. JERSEY-1616

Client#target(String) does not parse argument correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-m10
    • Fix Version/s: 2.0-rc1, 2.0
    • Component/s: core
    • Labels:
      None

      Description

      javadoc of Client#target says:

      throws IllegalArgumentException in case the supplied string is not a valid URI template.

      but

      String sWebTarget = ":xxx:8080//yyy:90090//jaxrs ";
      try {
              new URI(sWebTarget);
      	throw new RuntimeException("URI(" + sWebTarget + ") is valid");
      } catch (URISyntaxException e1) {
      	
      }
      try {
      	target = client.target(sWebTarget);
              throw new RuntimeException("IllegalArgumentException was not thrown for target " + sWebTarget);
      } catch (IllegalArgumentException e) {
      }
      

      UriSyntaxException is thrown but IAE is not.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 3 hours
              3h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour Time Not Required
              1h