forked from amazingfate/loongoffice
scripting: Pass a proper array equal to collection size.
Change-Id: I2c4c85b2da7b7037fc9da16793d18667b3d25503 Reviewed-on: https://gerrit.libreoffice.org/11375 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
@ -293,7 +293,7 @@ public class CommandLineTools {
|
||||
throw new Exception("No valid scripts found");
|
||||
|
||||
ParcelDescriptor desc = new ParcelDescriptor(parcelxml, language);
|
||||
desc.setScriptEntries((ScriptEntry[])scripts.toArray(new ScriptEntry[0]));
|
||||
desc.setScriptEntries((ScriptEntry[])scripts.toArray(new ScriptEntry[scripts.size()]));
|
||||
if (properties.size() != 0) {
|
||||
Enumeration enumer = properties.keys();
|
||||
|
||||
|
||||
@ -138,7 +138,7 @@ public class JavaFinder implements MethodFinder {
|
||||
}
|
||||
}
|
||||
|
||||
return new URLClassLoader(urls.toArray(new URL[0]));
|
||||
return new URLClassLoader(urls.toArray(new URL[urls.size()]));
|
||||
}
|
||||
|
||||
private ClassLoader getClassLoader(File basedir) {
|
||||
@ -232,6 +232,6 @@ public class JavaFinder implements MethodFinder {
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toArray(new String[0]);
|
||||
return result.toArray(new String[result.size()]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user