Skip to content

Ignoring properties from within a map difference #49

@opop

Description

@opop

Hi and thanks for sharing this great tool.
I am trying to diff an object with circular dependency -

class ToCompare
{
    Map<Integer, A> myMap;
}

class A
{
    .... some interesting properties to comapre...

    private MyList listObject;
}

class MyList
{
    MyList next;
    MyList prev;
}

The problem is, I'm not diffing two objects of type A but two MAPs of objects of type A.

the messages I get from object-diff look like this:
Detected circular reference in node at path /myMap{39}/listObject/prev/prev/next. Going deeper would cause an infinite loop, so I'll stop looking at this instance along the current path.
I get a lot of lines like this.

I try to use configuration.withoutProperty(PropertyPath.buildWith("myMap", "listObject"));
and it doesn't work. since listObject is not a property of myMap - I need to gain access to the actual values of myMap.

Do you happen to have any solution to this?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions