Minor code simplification.

This commit is contained in:
Daniel Ruthardt 2017-10-05 15:19:04 +02:00 committed by Tobi Schäfer
parent 9960e1c919
commit db8d239c32

View file

@ -417,8 +417,8 @@ public class ApplicationManager implements XmlRpcHandler {
repositoryList.add(new FileRepository( repositoryList.add(new FileRepository(
new File(server.getAppsHome(), appName))); new File(server.getAppsHome(), appName)));
} }
repositories = new Repository[repositoryList.size()];
repositories = (Repository[]) repositoryList.toArray(repositories); this.repositories = (RepositoryInterface[]) repositoryList.toArray(new RepositoryInterface[repositoryList.size()]);
} }
@ -530,7 +530,7 @@ public class ApplicationManager implements XmlRpcHandler {
if (debug != null) { if (debug != null) {
holder.setInitParameter("debug", debug); holder.setInitParameter("debug", debug);
} }
if (protectedStaticDir != null) { if (protectedStaticDir != null) {
File protectedContent = getAbsoluteFile(protectedStaticDir); File protectedContent = getAbsoluteFile(protectedStaticDir);
appContext.setResourceBase(protectedContent.getPath()); appContext.setResourceBase(protectedContent.getPath());