Skip to content

Make Java proxy wrappers more identical #8612

Open
@headius

Description

@headius

In #8224, @janko reported a case where a Java-based connection object appeared to not be identical to itself for purposes of keying a compare_by_identity Hash object. This is likely due to the proxy wrappers (JavaProxy and subtypes) not being treated as identical when a Hash does identity comparisons, making what seems like the same object not actually behave like the same object.

We already override the proxy equal? method to indicate that two equivalent wrappers are the same wrapper, but this behavior was never extended to other places where identity is important (specifically, compare_by_identity Hash instances). If we intend for proxy wrappers to always appear to be identical when the contained object is the same, we should extend the Hash logic and anywhere else that depends on identity to do the same thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy