mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
102124: Avoid null pointer when checking disposition
This commit is contained in:
@@ -208,6 +208,10 @@ public class BitstreamRestController {
|
||||
}
|
||||
|
||||
private boolean checkFormatForContentDisposition(BitstreamFormat format) {
|
||||
// never automatically download undefined formats
|
||||
if (format == null) {
|
||||
return false;
|
||||
}
|
||||
List<String> formats = List.of((configurationService.getArrayProperty("webui.content_disposition_format")));
|
||||
boolean download = formats.contains(format.getMIMEType());
|
||||
if (!download) {
|
||||
|
Reference in New Issue
Block a user