}
}
}
if (appDir != null) {
FileRepository appRep = new FileRepository(appDir);
if (!repositoryList.contains(appRep)) {
repositoryList.add(appRep);
}
} else if (repositoryList.isEmpty()) {
repositoryList.add(new FileRepository(
new File(server.getAppsHome(), appName)));
}
repositories = new Repository[repositoryList.size()];
repositories = (Repository[]) repositoryList.toArray(repositories);
}