Merge pull request #1123 from tuub/DS-2833

DS-2833: UploadWithEmbargoStep didn't parse Bitstream UUID correctly
This commit is contained in:
Pascal-Nicolas Becker
2015-10-29 15:52:03 +01:00
2 changed files with 6 additions and 2 deletions

View File

@@ -256,6 +256,10 @@ public class Util {
}
catch (Exception e)
{
// at least log this error to make debugging easier
// do not silently return null only.
log.warn("Unable to recoginze UUID from String \""
+ val.trim() + "\". Will return null.", e);
// Problem with parameter
return null;
}

View File

@@ -513,8 +513,8 @@ public class UploadWithEmbargoStep extends UploadStep
}
// FORM: UploadStep SELECTED OPERATION: go to EditBitstreamPolicies
else if (buttonPressed.startsWith("submit_editPolicy_")){
String bitstreamID = buttonPressed.substring("submit_editPolicy_".length());
Bitstream b = bitstreamService.find(context, Util.getUUIDParameter(request, bitstreamID));
UUID bitstreamID = UUID.fromString(buttonPressed.substring("submit_editPolicy_".length()));
Bitstream b = bitstreamService.find(context, bitstreamID);
subInfo.setBitstream(b);
return STATUS_EDIT_POLICIES;
}