[midPoint-git] [Evolveum/midpoint] 1070d3: Smart Integration: Fix NPE and concurrency bugs in...

Michal Zelenčík noreply at github.com
Mon Apr 27 14:49:42 CEST 2026


  Branch: refs/heads/master
  Home:   https://github.com/Evolveum/midpoint
  Commit: 1070d3f7fbd1db4c96a8bb1c1b5a0268b7e78a75
      https://github.com/Evolveum/midpoint/commit/1070d3f7fbd1db4c96a8bb1c1b5a0268b7e78a75
  Author: Michal Zelencik <michal.zelencik at evolveum.com>
  Date:   2026-04-27 (Mon, 27 Apr 2026)

  Changed paths:
    M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/MappingsSuggestionOperation.java

  Log Message:
  -----------
  Smart Integration: Fix NPE and concurrency bugs in MappingsSuggestionOperation

NullPointerException was thrown in the thenRun cleanup stage when
mappingResult was null. This happened because mappingResultReference
was only set after the shouldSkipReadOnlyAttribute() check, so any
early return left it uninitialized. The fix moves operationReference
and mappingResultReference initialization to before the skip check,
guaranteeing they are always set.

Additionally fixed two related bugs discovered during review:
- Double recordProcessingEnd() call for skipped attributes: the skip
  branch in supplyAsync called it, then thenAccept called it again
  on receiving null, overcounting progress statistics. Removed the
  redundant call from the skip branch.
- Unsynchronized concurrent access to mappingCandidates.propose():
  thenAccept runs on ForkJoinPool threads and multiple futures called
  propose() concurrently on the underlying ArrayList. Added
  synchronization on the mappingCandidates instance.

Signed-off-by: Michal Zelencik <michal.zelencik at evolveum.com>



To unsubscribe from these emails, change your notification settings at https://github.com/Evolveum/midpoint/settings/notifications


More information about the midPoint-svn mailing list