Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Object get(final Object target)
}
for (final Object item : targetCollection)
{
if (item.equals(referenceItem))
if (item != null && item.equals(referenceItem))
{
return item;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@ public void test_returns_full_property_graph_of_added_collection_items()
.withMapKey("foo")
.withPropertyName("value")).hasState(Node.State.ADDED);
}

@Test
public void test_collection_with_null_item()
{
ObjectDifferFactory.getInstance().compare(Arrays.asList((String)null), Arrays.asList("foobar"));
}
}