Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1877

Default implementation of .equals fails with Proxy objects

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.7.2.Final
    • None
    • Furnace (Container)
    • None

      proxyObjectA.equals(proxyObjectA) returns false

      This appears to be because the default .equals method ends up being called on the unwrapped (non-proxied) proxyObjectA, but it is passed the wrapped (proxied) object as the parameter.

      One workaround is to always call Proxies.unwrap before calling .equals, but this is error-prone. Perhaps the argument to .equals should be unwrapped by default if it is wrapped?

              lincolnthree Lincoln Baxter III (Inactive)
              jsightle@redhat.com Jess Sightler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: