Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detected inconsistency error #194

Open
Wolfgang-Winter opened this issue Sep 29, 2017 · 0 comments
Open

Detected inconsistency error #194

Wolfgang-Winter opened this issue Sep 29, 2017 · 0 comments

Comments

@Wolfgang-Winter
Copy link

Hi, we get (sometimes) an exception when comparing two objects and I don't know what it means:

Caused by: java.lang.IllegalArgumentException: Detected inconsistency in enter/leave sequence. Must always be LIFO. at de.danielbechler.diff.circular.CircularReferenceDetector.remove(CircularReferenceDetector.java:113) at de.danielbechler.diff.differ.DifferDispatcher.forgetInstances(DifferDispatcher.java:205) at de.danielbechler.diff.differ.DifferDispatcher.compareWithCircularReferenceTracking(DifferDispatcher.java:164) at de.danielbechler.diff.differ.DifferDispatcher.compare(DifferDispatcher.java:145) at de.danielbechler.diff.differ.DifferDispatcher.dispatch(DifferDispatcher.java:93) at de.danielbechler.diff.differ.BeanDiffer.compareUsingIntrospection(BeanDiffer.java:114) at de.danielbechler.diff.differ.BeanDiffer.compareUsingAppropriateMethod(BeanDiffer.java:104) at de.danielbechler.diff.differ.BeanDiffer.compare(BeanDiffer.java:90) at de.danielbechler.diff.differ.DifferDispatcher.compare(DifferDispatcher.java:188) at de.danielbechler.diff.differ.DifferDispatcher.compareWithCircularReferenceTracking(DifferDispatcher.java:158) at de.danielbechler.diff.differ.DifferDispatcher.compare(DifferDispatcher.java:145) at de.danielbechler.diff.differ.DifferDispatcher.dispatch(DifferDispatcher.java:93) at de.danielbechler.diff.differ.CollectionDiffer.compareItems(CollectionDiffer.java:119) at de.danielbechler.diff.differ.CollectionDiffer.compareInternally(CollectionDiffer.java:141) at de.danielbechler.diff.differ.CollectionDiffer.compare(CollectionDiffer.java:93) at de.danielbechler.diff.differ.DifferDispatcher.compare(DifferDispatcher.java:188) at de.danielbechler.diff.differ.DifferDispatcher.compareWithCircularReferenceTracking(DifferDispatcher.java:158) at de.danielbechler.diff.differ.DifferDispatcher.compare(DifferDispatcher.java:145) at de.danielbechler.diff.differ.DifferDispatcher.dispatch(DifferDispatcher.java:93) at de.danielbechler.diff.differ.BeanDiffer.compareUsingIntrospection(BeanDiffer.java:114) at de.danielbechler.diff.differ.BeanDiffer.compareUsingAppropriateMethod(BeanDiffer.java:104) at de.danielbechler.diff.differ.BeanDiffer.compare(BeanDiffer.java:90) at de.danielbechler.diff.differ.DifferDispatcher.compare(DifferDispatcher.java:188) at de.danielbechler.diff.differ.DifferDispatcher.compareWithCircularReferenceTracking(DifferDispatcher.java:158) at de.danielbechler.diff.differ.DifferDispatcher.compare(DifferDispatcher.java:145) at de.danielbechler.diff.differ.DifferDispatcher.dispatch(DifferDispatcher.java:93) at de.danielbechler.diff.ObjectDiffer.compare(ObjectDiffer.java:49) at com.logitags.cibet.core.CibetUtil.compare(CibetUtil.java:497)

Here is our code:

L. 497: DiffNode root = getObjectDiffer().compare(work, base);

public static ObjectDiffer getObjectDiffer() {
if (objectDiffer == null) {
objectDiffer = ObjectDifferBuilder.startBuilding().introspection()
.setDefaultIntrospector(new EntityIntrospector()).and().differs()
.register(new PrimitiveArrayDifferFactory()).build();
}
return objectDiffer;
}

Can it be that when several theads execute this code in parallel there is some concurrency problem? Is this thread-safe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant