Skip to content

Commit

Permalink
Update hamcrest/src/main/java/org/hamcrest/collection/IsMapContaining…
Browse files Browse the repository at this point in the history
….java

Co-Authored-By: Stephan van Hulst <[email protected]>
  • Loading branch information
brownian-motion and nibsi authored Apr 13, 2020
1 parent 7e26e11 commit 15c523c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ public IsMapContainingEntry(K key, V value)
@Override
public boolean matchesSafely(Map<? extends K, ? extends V> map)
{
return map.containsKey(key) && super.valueMatcher.matches(map.get(key));
try {
return map.containsKey(key) && super.valueMatcher.matches(map.get(key));
catch (NullPointerException ex) {
return false;
}
}
}

Expand Down

0 comments on commit 15c523c

Please sign in to comment.