You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Jan Krpata (JIRA)" <ji...@apache.org> on 2017/08/25 12:06:01 UTC

[jira] [Created] (OWB-1215) Specializing more then one producer method not working

Jan Krpata created OWB-1215:
-------------------------------

             Summary: Specializing more then one producer method not working
                 Key: OWB-1215
                 URL: https://issues.apache.org/jira/browse/OWB-1215
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Inheritance, Specialization
    Affects Versions: 2.0.0
            Reporter: Jan Krpata


A have problem with specializing a producer method
- https://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#specialize_producer_method

I have class A with many @Produces methods.
I have class B extends A, where I can override some producer methods (more then one and not all) from superclass. The other producer methods must be still enabled from superclass.

Method WebBeansUtil.configureProducerMethodSpecializations throw WebBeansDeploymentException "Multiple specializations for the same producer method got detected for type".

Example:
{code:java}
public class A {
  @Produces
  @OneProducesMethod
  public Boolean getX() { ...}

  @Produces
  @TwoProducesMethod
  public Boolean getY() { ...}

  @Produces
  @ThreeProducesMethod
  public Boolean getZ() { ...}
} 

public class B extends A {
  @Produces
  @Specializes
  @OneProducesMethod
  public Boolean getX() { ...}

  @Produces
  @Specializes
  @TwoProducesMethod
  public Boolean getY() { ...}
} 
{code}





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)