Bug fixes to REST API as reported by Error Prone

This commit is contained in:
Tim Donohue
2017-10-05 17:05:04 +00:00
parent 22f7690a19
commit 5edb6f4a7c
2 changed files with 2 additions and 2 deletions

View File

@@ -227,7 +227,7 @@ public class FilteredCollectionsResource extends Resource {
}
catch (ContextException e)
{
processException(String.format("Could not read collection %d. %s", collection_id, e.getMessage()), context);
processException(String.format("Could not read collection %s. %s", collection_id, e.getMessage()), context);
} finally {
processFinally(context);
}

View File

@@ -71,7 +71,7 @@ public class Bitstream extends DSpaceObject {
}
//A logo bitstream might not have a bundle...
if (bitstream.getBundles() != null & bitstream.getBundles().size() >= 0)
if (bitstream.getBundles() != null && !bitstream.getBundles().isEmpty())
{
if (bitstreamService.getParentObject(context, bitstream).getType() == Constants.ITEM)
{