mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 23:43:06 +00:00
DS-4166 community feedback: report about not existing uuid
This commit is contained in:
@@ -156,6 +156,9 @@ public class IndexClient {
|
||||
} else if (line.hasOption("item_uuid")) {
|
||||
String itemUUID = line.getOptionValue("item_uuid");
|
||||
Item item = ContentServiceFactory.getInstance().getItemService().find(context, UUID.fromString(itemUUID));
|
||||
if (item == null) {
|
||||
throw new IllegalArgumentException("Cannot resolve " + itemUUID + " to an Item");
|
||||
}
|
||||
indexer.indexContent(context, item, line.hasOption("f"));
|
||||
} else if (line.hasOption('i')) {
|
||||
final String handle = line.getOptionValue('i');
|
||||
|
Reference in New Issue
Block a user