Skip to content

Commit

Permalink
fix NPE for Optional lookup in MockProblemChangeDirector (#2871)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobJohansen authored Sep 8, 2023
1 parent 34a0c16 commit 9b56182
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public <EntityOrProblemFact> EntityOrProblemFact lookUpWorkingObjectOrFail(Entit
@Override
public <EntityOrProblemFact> Optional<EntityOrProblemFact>
lookUpWorkingObject(EntityOrProblemFact externalObject) {
return Optional.of((EntityOrProblemFact) lookUpTable.get(externalObject));
return Optional.ofNullable((EntityOrProblemFact) lookUpTable.get(externalObject));
}

@Override
Expand Down

0 comments on commit 9b56182

Please sign in to comment.