jersey
  1. jersey
  2. JERSEY-1570

Resoure.from(Object resource, List<ResourceModelIssue> issueList) does not create Resource based on instance (Object resource)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Works as designed
    • Affects Version/s: None
    • Fix Version/s: 2.0-m11, 2.0
    • Component/s: None
    • Labels:
      None

      Description

      This code does not store instance but only uses the class of the instance (the instance is ignored):

          public static Resource from(Object resource, List<ResourceModelIssue> issueList) {
              final Builder builder = new IntrospectionModeller(resource.getClass(), issueList).createResourceBuilder(true);
              return builder.isEmpty() ? null : builder.build();
          }
      

      MethodHadnler is then class based and not instance based.

      The instance should be kept and used for request dispatching.

        Activity

        Miroslav Fuksa created issue -
        Martin Matula made changes -
        Field Original Value New Value
        Fix Version/s 2.0-m11 [ 16165 ]
        Fix Version/s 2.0 [ 15271 ]
        Fix Version/s 2.0-unplanned [ 15288 ]
        Pavel Bucek made changes -
        Fix Version/s 2.0 [ 15271 ]
        Fix Version/s 2.0-m11 [ 16171 ]
        Fix Version/s 2.0-m11-tmp [ 16165 ]
        Miroslav Fuksa made changes -
        Assignee mfuksa [ mfuksa ]
        Miroslav Fuksa made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Miroslav Fuksa made changes -
        Remaining Estimate 3 hours [ 10800 ] 1 hour [ 3600 ]
        Time Spent 2 hours [ 7200 ]
        Miroslav Fuksa made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Works as designed [ 7 ]
        Marek Potociar made changes -
        Remaining Estimate 1 hour [ 3600 ] 0 minutes [ 0 ]
        Time Spent 2 hours [ 7200 ] 3 hours [ 10800 ]
        Marek Potociar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Miroslav Fuksa
            Reporter:
            Miroslav Fuksa
          • 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 - 3 hours
              3h