Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-985

Proxied CDI sub-resource has wrong parameters injected

    Details

      Description

      @Path("/test")
      public class TestResource {
      
          @Inject
          FooResource fooResource;
      
          @Path("lookup")
          public FooResource lookup() {
              return fooResource;
          }
      
          @ApplicationScoped // Weld uses a proxy
          public static class FooResource {
      
              @GET
              public String get(@QueryParam("foo") List<Foo> foos) {
                  // Bug: It's not a List<Foo>, it's a List<String>
                  for (Foo foo : foos) {
                      return "OK";
                  }
                  return null;
              }
      
          }
          public static class Foo {
              String value;
      
              public Foo(String value) {
                  this.value = value;
              }
          }
      }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bill.burke Bill Burke
                Reporter:
                christian.bauer Christian Bauer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: