mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-05-26 17:24:47 +00:00
There is an NPE in libreoffice when the external files are not present and debug is enabled (#218)
ATS-714: Fix NPE in libreoffice executor when the external files are not present and debug is enabled
This commit is contained in:
parent
6c7a2246e3
commit
4a46948648
@ -438,9 +438,19 @@ public class JodConverterSharedInstance implements JodConverter
|
|||||||
}
|
}
|
||||||
|
|
||||||
File[] matchingFiles = searchRoot.listFiles((dir, name) -> name.startsWith("soffice"));
|
File[] matchingFiles = searchRoot.listFiles((dir, name) -> name.startsWith("soffice"));
|
||||||
|
if (matchingFiles == null)
|
||||||
|
{
|
||||||
|
return results;
|
||||||
|
}
|
||||||
results.addAll(asList(matchingFiles));
|
results.addAll(asList(matchingFiles));
|
||||||
|
|
||||||
for (File dir : requireNonNull(searchRoot.listFiles(File::isDirectory)))
|
File[] matchingDirectories = searchRoot.listFiles(File::isDirectory);
|
||||||
|
if (matchingDirectories == null)
|
||||||
|
{
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (File dir : requireNonNull(matchingDirectories))
|
||||||
{
|
{
|
||||||
findSofficePrograms(dir, results, currentRecursionDepth + 1, maxRecursionDepth);
|
findSofficePrograms(dir, results, currentRecursionDepth + 1, maxRecursionDepth);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user