Merge pull request #71 from lassewesth/DATAGRAPH-276

DATAGRAPH-276 fixing guard to support Iterable
This commit is contained in:
Michael Hunger
2012-08-06 02:22:09 -07:00

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;