mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-10-01 14:41:17 +00:00
MNT-24883 PMD scan fix
This commit is contained in:
@@ -90,6 +90,8 @@ public class FileManager
|
||||
}
|
||||
|
||||
private static File createFileFromRequest(HttpServletRequest request, String extension) throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
String submittedFileName = request.getParts().stream()
|
||||
.filter(part -> part instanceof MultipartFile && StringUtils.isNotEmpty(part.getSubmittedFileName()))
|
||||
@@ -100,6 +102,12 @@ public class FileManager
|
||||
? TempFileProvider.createFileWithinUUIDTempDir(submittedFileName)
|
||||
: TempFileProvider.createTempFile("source_", extension);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new TransformException(INTERNAL_SERVER_ERROR, "Failed to create source file from request", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static File createSourceFileUsingOriginalFileName(String sourceFileName, InputStream inputStream, String sourceMimetype)
|
||||
{
|
||||
|
Reference in New Issue
Block a user