jersey
  1. jersey
  2. JERSEY-1777

AsyncWebResource.path(String) do no copy parent ressource proerties.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.17
    • Fix Version/s: 1.18
    • Component/s: core
    • Labels:
      None

      Description

      When creating a new AsyncWebResource using path(String) method, the properties are not copied from the parent resource. There is no way to do it.

      public AsyncWebResource path(String path)

      { return new AsyncWebResource(this, getUriBuilder().path(path)); }

      which calls:

      protected AsyncWebResource(AsyncWebResource that, UriBuilder ub)

      { super(that); this.executorService = that.executorService; this.u = ub.build(); }

        Activity

        Hide
        david.joaquim added a comment - - edited

        Ok

        Nevertheless, the fix is small:

            protected AsyncWebResource(AsyncWebResource that, UriBuilder ub) {
                super(that);
                this.executorService = that.executorService;
                this.u = ub.build();
        +       this.properties = that.getProperties().clone();
            }
        

        As we planned not to use Jersey 2.0 before it is production ready. I'll enjoy the fix!

        Thanks you!

        Show
        david.joaquim added a comment - - edited Ok Nevertheless, the fix is small: protected AsyncWebResource(AsyncWebResource that, UriBuilder ub) { super (that); this .executorService = that.executorService; this .u = ub.build(); + this .properties = that.getProperties().clone(); } As we planned not to use Jersey 2.0 before it is production ready. I'll enjoy the fix! Thanks you!
        Hide
        Marek Potociar added a comment -

        Moving to 1.x backlog, even though we do not have plans to dedicate resources to fix the issue any time soon given that JAX-RS 2.0 client API is going to be final together with its Jersey 2.0 support in a few weeks.

        Show
        Marek Potociar added a comment - Moving to 1.x backlog, even though we do not have plans to dedicate resources to fix the issue any time soon given that JAX-RS 2.0 client API is going to be final together with its Jersey 2.0 support in a few weeks.

          People

          • Assignee:
            Marek Potociar
            Reporter:
            david.joaquim
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: