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

Wrong veto logic in CDIExtensionPoints class

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Partially Completed
    • Affects Version/s: 2.2.0.CR2
    • Fix Version/s: 2.4.0.Final
    • Component/s: ErraiCDI
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Rename package names so that they do not contain "client" substring in their name.

      Show
      Rename package names so that they do not contain "client" substring in their name.

      Description

      CDIExtensionPoints vetoes all beans which contain substring "client" in their package name due to this snippet of code:

      if (vetoClasses.contains(type.getJavaClass().getName())

      (type.getJavaClass().getPackage().getName().contains("client") && !type.getJavaClass().isInterface())) { event.veto(); }

      The bug leads to hard-to-debug issues when beans are located in packages like org.company.name.forms.clients.server.

      I think it would make sense to add more robust package name validation logic or at least replace .contains("client") to .contains(".client")

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                cbrock Mike Brock
                Reporter:
                roman.k R K
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: