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

Proxied CDI sub-resource has wrong parameters injected

    XMLWordPrintable

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;
              }
          }
      }
      

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            christian.bauer_jira Christian Bauer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: