n&n for optaplanner
(cherry picked from commit 54fe503297b83391fc708bc002074a00d1392197)