...the resulting DiffNode tells reads / => UNTOUCHED, even though the two compared objects are quite different.
Looking through the issues, I have found mentions of this being because the objects are POJOs and not JavaBeans. I have also seen mention of an Introspector and the IntrospectionConfiguration. I have been trying to figure something out with this, but have not come to a solution.
Is it possible to adequately compare objects like these?
public class GameCharacter {
@Id
public String _id;
public String name;
public Weapon weapon;
public Armor armor;
public List<Item> inventory;
public GameCharacter() {
}
public GameCharacter(String name, Weapon weapon, Armor armor, String _id, List<Item> inventory) {
this._id = _id;
this.name = name;
this.weapon = weapon;
this.armor = armor;
this.inventory = inventory;
}
}
The main question here is if it is possible to somehow use java-object-diff without the need to implement getters and setters.
For reference, you can find all the files and my attempts in the following repository:
https://github.com/Kira-Cesonia/tri-JaDe
Check out the delta.DeltaApplierTest
I have two quite different objects
When comparing them like this:
...the resulting DiffNode tells reads
/ => UNTOUCHED
, even though the two compared objects are quite different.Looking through the issues, I have found mentions of this being because the objects are POJOs and not JavaBeans. I have also seen mention of an Introspector and the IntrospectionConfiguration. I have been trying to figure something out with this, but have not come to a solution.
Is it possible to adequately compare objects like these?
The main question here is if it is possible to somehow use java-object-diff without the need to implement getters and setters.
For reference, you can find all the files and my attempts in the following repository: https://github.com/Kira-Cesonia/tri-JaDe Check out the delta.DeltaApplierTest