ArrayList newRepositories = new ArrayList();
HashMap newRepositories = new HashMap();
    public synchronized void update() {        if (file.lastModified() != lastModified) {            lastModified = file.lastModified();            ZipFile zipfile = null;            try {                zipfile = getZipFile();                Enumeration en = zipfile.entries();                ArrayList newRepositories = new ArrayList();                HashMap newResources = new HashMap();                while (en.hasMoreElements()) {                    ZipEntry entry = (ZipEntry) en.nextElement();                    String entryname = entry.getName();                    String[] entrypath = StringUtils.split(entryname, "/");                    // create new repositories and resources for all entries with a                    // path depth of this.depth + 1                    if (entrypath.length == depth + 1) {                        if (entry.isDirectory()) {                            newRepositories.add(new ZipRepository(file, this, entry));                        } else {                            ZipResource resource = new ZipResource(file, entry, this);                            newResources.put(resource.getShortName(), resource);                        }                    }                }                repositories = (Repository[])                        newRepositories.toArray(new Repository[newRepositories.size()]);                resources = newResources;            } catch (IOException ex) {                ex.printStackTrace();                repositories = new Repository[0];                if (resources == null) {                    resources = new HashMap();                } else {                    resources.clear();                }            } finally {                try {                    // unlocks the zip file in the underlying filesystem                    zipfile.close();                } catch (Exception ex) {}            }        }    }