Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1492

Producers with parameterized return types with a nested parameterized type containing a wildcard or type variable are not detected as invalid

XMLWordPrintable

      Weld does not report a definition error for the following producers:

      @Produces Bar<Foo<?>> wildcardFooBarProducerField;
      @Produces Bar<Foo<?>> produceWildcardFooBar() { ... }
      @Produces @RequestScoped Bar<Foo<T>> typedFooBarProducerField;
      @Produces @RequestScoped Bar<Foo<T>> produceTypedFooBar() { ... };
      

      But it does report the error for simple(r) producers:

      @Produces Foo<?> wildcardFooProducerField;
      @Produces Foo<?> produceWildcardFoo() { ... }
      @Produces @RequestScoped Foo<T> typedFooProducerField;
      @Produces @RequestScoped Foo<T> produceTypedFoo() { ... };
      

            marko.luksa@gmail.com Marko Luksa (Inactive)
            marko.luksa@gmail.com Marko Luksa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: