Uploaded image for project: 'Errai'
  1. Errai
  2. ERRAI-1016

Duplicate method getContext() in generated Proxy error

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ErraiIOC
    • Labels:
      None

      Description

      We've got an abstract class containing getContext() method https://github.com/droolsjbpm/kie-wb-common/blob/master/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-client/src/main/java/org/kie/workbench/common/screens/datamodeller/client/widgets/common/domain/BaseDomainEditor.java#L75 which has multiple @ApplicationScope implementations, e.g. https://github.com/droolsjbpm/kie-wb-common/blob/master/kie-wb-common-screens/kie-wb-common-data-modeller/kie-wb-common-data-modeller-client/src/main/java/org/kie/workbench/common/screens/datamodeller/client/widgets/jpadomain/JPADataObjectEditor.java

      The compilation fails with the following error:

      [ERROR] Errors in '/tmp/gwt-codeserver-137189374766769051.tmp/org.optaplanner.workbench.OptaPlannerWorkbench/compile-2/gen/org/jboss/errai/ioc/client/Type_factory__o_k_w_c_s_d_c_w_j_JPADomainEditor__quals__j_e_i_Any_j_e_i_Default.java'
                  [ERROR] Line 67: The return type is incompatible with BaseDomainEditor.getContext()
                  [ERROR] Line 67: Duplicate method getContext() in type Type_factory__o_k_w_c_s_d_c_w_j_JPADomainEditor__quals__j_e_i_Any_j_e_i_Default.Type_factory__o_k_w_c_s_d_c_w_j_JPADomainEditor__quals__j_e_i_Any_j_e_i_DefaultProxyImpl
                  [ERROR] Line 89: Duplicate method getContext() in type Type_factory__o_k_w_c_s_d_c_w_j_JPADomainEditor__quals__j_e_i_Any_j_e_i_Default.Type_factory__o_k_w_c_s_d_c_w_j_JPADomainEditor__quals__j_e_i_Any_j_e_i_DefaultProxyImpl
      

      I suspect the error is caused by the following change which added getContext() method to the generated Proxy:
      https://github.com/errai/errai/commit/c7e3618269e5454363b1117e14ec52a4be09cb4f#diff-acbde666a89dee08847e11cfe629e574R59

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mbarkley Max Barkley
                Reporter:
                mcimbora Matej Čimbora
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: