-
Bug
-
Resolution: Outdated
-
Major
-
None
-
5.4
-
None
This behavior was observed when analyzing PAGES-17.
With the new registry API of 5.4, we proxy* all definitions that implement NamedDefinition. This proxy currently "decorates" the underlying definition objects to manage their ID and NAME properties.
When two such proxied objects are compared, the calls to equals method are intercepted just like any other, and delegated to the underlying object. The arguments to the method are however not unwrapped, so the comparison never works.
To illustrate:
Given proxies p1 and p2, which respectively proxy o1 and o2 objects. o1==o2 and p1==p2 are both true. When calling p1.equals(p2), p1 intercepts the calls to equals and delegates it to o1, which essentially results in o1.equals(p2), which is obviously never true.
I'm pretty sure I saw some equals (and possible hashcode) specific handling in ProxyToys somewhere, either it's optional or it's what's actually causing the issues. I'll dig it out !
- for the sake of clarity/brevity, all "proxy" here actually refers to our usage of ProxyToys in the context of the configuration APIs. We also use ProxyToys in magnolia-i18n, so we'll need to verify the behavior there as well.
- is causing
-
PAGES-17 Moving pages is broken
- Closed
- relates to
-
MULTISITE-28 By usage of smartphone variation, all links are created as external links, in sites with no domain configured
- Closed