Permalink
Browse files

Fixed empty list bug

  • Loading branch information...
1 parent 1807eb2 commit a5a6ff2169907aedfdcaef3f0838a3a68bdb3420 @cgueret committed May 16, 2012
@@ -73,11 +73,12 @@
throw new EntityNotFoundException(null);
// De-serialize the data
+ List<Reference> results = new ArrayList<Reference>();
@SuppressWarnings("unchecked")
List<String> uris = (List<String>) entity.getProperty(RESOURCE_PROPERTY);
- List<Reference> results = new ArrayList<Reference>();
- for (String uri : uris)
- results.add(new Reference(uri));
+ if (uris != null)
+ for (String uri : uris)
+ results.add(new Reference(uri));
return results;
}
Binary file not shown.

0 comments on commit a5a6ff2

Please sign in to comment.