wlbkeats
unread,Feb 23, 2012, 12:10:19 AM2/23/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Axon Framework Users
ComparationEntry add to comparedEntries twice, so the second time
comparedEntries.add(new ComparationEntry(workingValue,
eventSourcedValue) will aways return false! Then it will never do
fields value compare.
private void
assertValidWorkingAggregateState(EventSourcedAggregateRoot
eventSourcedAggregate) {
HashSet<ComparationEntry> comparedEntries = new
HashSet<ComparationEntry>();
comparedEntries.add(new ComparationEntry(workingAggregate,
eventSourcedAggregate));
...
}
private void ensureValuesEqual(Object workingValue, Object
eventSourcedValue, String propertyPath,
Set<ComparationEntry>
comparedEntries) {
if (explicitlyUnequal(workingValue, eventSourcedValue)) {
...
} else if (comparedEntries.add(new
ComparationEntry(workingValue, eventSourcedValue))
&& workingValue != null && !
hasEqualsMethod(workingValue.getClass())) {
...
}
}