Skip to content

Commit

Permalink
added null check for objects without datastreams
Browse files Browse the repository at this point in the history
  • Loading branch information
fasseg committed Mar 19, 2013
1 parent 0bf2427 commit e04a339
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -48,6 +48,9 @@ public ObjectFixity check(String objectId) throws IOException, NoSuchAlgorithmEx
final List<DatastreamFixity> errors = new ArrayList<DatastreamFixity>();
final List<DatastreamFixity> successes = new ArrayList<DatastreamFixity>();
final ObjectDatastreams datastreams = client.getObjectDatastreams(objectId);
if (datastreams == null || datastreams.datastreams == null){
logger.warn("There are no datastreams available for pid: " + objectId);
}
for (ObjectDatastreams.DatastreamElement dsElement : datastreams.datastreams) {
logger.debug("verifying checksum of object {} datastream {}", objectId, dsElement.dsid);
final String dsId = dsElement.dsid;
Expand Down

0 comments on commit e04a339

Please sign in to comment.