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

WeldExpressionFactory.equals returns false for two instances wrapping the same delegate

    XMLWordPrintable

Details

    Description

      The WeldExpressionFactory.equals impl is as follows:

      return this == obj || delegate().equals(obj);

      The result is that if 'obj' is another WeldExpressionFactory it returns false, even if obj has an equal delegate. The only state held by WeldExpressionFactory is the delegate, so logically I think two instances wrapping equal delegates are themselves equal.

      This causes https://issues.redhat.com/browse/WFLY-16948 which is basically an issue to fix a failure in this Faces 4 TCK test:

      https://github.com/jakartaee/faces/blob/master/tck/old-tck/source/src/com/sun/ts/tests/jsf/api/jakarta_faces/application/application/TestServlet.java#L1440-L1501

      This is an old test, but started to fail with the Faces 4 TCK, which made the deployment being tested a CDI app. That changed the code paths WildFly uses, which surfaced this issue.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: