jersey
  1. jersey
  2. JERSEY-1457

UriBuilder#uri(String) throws Schema specific part is opaque when uri does not have the schema

    Details

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

      Description

      String origUris[] = {"news:comp.lang.java", "tel:+1-816-555-1212"};
      URI[] replaceUris = {new URI(null, "news.lang.java", null), new URI(null, "+1-866-555-1212", null)};
      int cnt = 0;
      while (cnt < origUris.length()){
      UriBuilder.fromUri(new URI(origUris[cnt])).uri(replaceUris[cnt].toASCIIString()).build();
      cnt++;
      }
      

      throws:

      Schema specific part is opaque.

      This worked in previous version. Also UriBuilder.fromUri(new URI(origUris[cnt])).uri(replaceUris[cnt]).build(); works. There has been added additional check for schema in the String, but the schema can be taken from the original.

        Issue Links

          Activity

          There are no comments yet on this issue.

            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 - 3 hours
                3h
                Remaining:
                0m
                Logged:
                Time Not Required
                1m