tkobayas commented on code in PR #6341:
URL:
https://github.com/apache/incubator-kie-drools/pull/6341#discussion_r2086213092
##########
drools-reliability/drools-reliability-core/src/main/java/org/drools/reliability/core/ReliableSessionInitializer.java:
##########
@@ -85,8 +85,8 @@ public InternalWorkingMemory init(InternalWorkingMemory
session, PersistedSessio
}
private void onWorkingMemoryAction(InternalWorkingMemory session,
PropagationEntry entry) {
- if (entry instanceof PropagationEntry.Insert) {
- InternalFactHandle fh = ((PropagationEntry.Insert)
entry).getHandle();
+ if (entry instanceof PropagationEntry.Insert || entry instanceof
PropagationEntry.Update) {
+ InternalFactHandle fh =
((PropagationEntry.AbstractPropagationEntry) entry).getHandle();
if (fh.isValid()) {
WorkingMemoryEntryPoint ep = fh.getEntryPoint(session);
((SimpleReliableObjectStore)
ep.getObjectStore()).putIntoPersistedStorage(fh, true);
Review Comment:
`PropagationEntry.Insert` and `PropagationEntry.Update` are subclass of
`PropagationEntry.AbstractPropagationEntry`. Adding such `if` looks too much
:thinking:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]