java-object-diff icon indicating copy to clipboard operation
java-object-diff copied to clipboard

java object diff treat the same objects as different

Open songtianyi opened this issue 8 years ago • 10 comments

When comparing List<Object>, it think baseValue is null and workingValue is the first object of the list. Did i missing something?

songtianyi avatar Aug 16 '17 06:08 songtianyi

baseValue always be null, fking wired :(

songtianyi avatar Aug 16 '17 08:08 songtianyi

I have tried to add @Id annotation for Objects, but still not work.

songtianyi avatar Aug 16 '17 08:08 songtianyi

I have the same question for List<Object> compare, is there any update?

hiyizhiyu avatar Nov 28 '17 11:11 hiyizhiyu

diff

actual expect

hi, as the pictures, actually the objects have the same position "0" and same value "101109" in the list. I expected they are the same but result is diff with "ADD". could anyone can help it?

hiyizhiyu avatar Nov 28 '17 11:11 hiyizhiyu

@hiyizhiyu Try override equal method of objects

songtianyi avatar Nov 28 '17 13:11 songtianyi

@songtianyi Really thanks!

I just override equals method in StringWrapper class as below image but it didn't work! you means diffs will invoke object's equals method? could you help give more detailed information?

hiyizhiyu avatar Nov 29 '17 05:11 hiyizhiyu

@hiyizhiyu sorry, i am not using this package any more.

songtianyi avatar Dec 04 '17 15:12 songtianyi

@hiyizhiyu I didn't have tried that solution, it's just a suggestion.

songtianyi avatar Dec 04 '17 15:12 songtianyi

Any update on this issue? I'm having the same problem with version 0.95

jcardenaslie avatar Mar 09 '20 13:03 jcardenaslie

That issue makes the library almost useless

DredderGun avatar Feb 08 '21 12:02 DredderGun