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

Proxy naming conflict when using static nested classes with the same name and package.

    Details

    • Steps to Reproduce:
      Hide

      Create two classes in the same package, for example A and B.
      Create nested static classes with name C in classes A and B.
      Write test class, which has injectable fields of classes A.C and B.C.
      Access fields to force bean access.
      You should get an exception (don't remember exact class).

      As workaround you can use unique names for nested static classes.

      Show
      Create two classes in the same package, for example A and B. Create nested static classes with name C in classes A and B. Write test class, which has injectable fields of classes A.C and B.C. Access fields to force bean access. You should get an exception (don't remember exact class). As workaround you can use unique names for nested static classes.
    • Bugzilla Update:
      Perform

      Description

      Weld unable to distinguish beans, then it's nested static classes with the same class name and package, but different enclosing classes. Weld generates the same proxy name for such classes and tries to inject incorrect bean.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bafco Matus Abaffy
                  Reporter:
                  ylepikhov Юрий Лепихов
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: