DATAGRAPH-276 fixing guard to support Iterable

This commit is contained in:
Lasse Westh-Nielsen
2012-08-06 10:14:47 +01:00
parent 54053f3ac7
commit 8c542f2a9f

View File

@@ -101,7 +101,7 @@ public class RelatedToViaCollectionFieldAccessorFactory implements FieldAccessor
}
protected Map<Node, Object> loadEndNodeToRelationshipEntityMapping(Object newVal, Node startNode) {
if (!(newVal instanceof Set)) {
if (!(newVal instanceof Iterable)) {
throw new IllegalArgumentException("New value must be at least an Iterable, was: " + newVal.getClass());
}
@SuppressWarnings("unchecked") Iterable<Object> iterable = (Iterable<Object>) newVal;