public void visitDirectory(File dir, boolean isDevel, Map<String, IRepositoryRoot> newRoots, IRepository repository, boolean force) {
		if (!isDevel) {
			// find jar files
			final File[] jars = dir.listFiles(new FileFilter() {
				public boolean accept(File pathname) {
					String path = pathname.toString().toLowerCase();
					return pathname.isFile() && (path.endsWith(".jar") || path.endsWith(".zip"));
				}
			});

			if (jars == null) {
				return; // Avoid NPE by returning
			}

			// update jar files
			for (File jar : jars) {
				String key;

				try {
					key = "jar:" + jar.toURI().toURL().toString() + "!/";
				} catch (MalformedURLException e) {
					e.printStackTrace();
					continue;
				}
				IRepositoryRoot root = repository.getRoots().get(key);
				if (root == null) {
					root = new JarRoot(repository, jar);
				} else {
					repository.removeRoot(key);
				}

				root.updateItems(force);
				newRoots.put(key, root);

				try {
					URLJarCollector.closeJarURLConnection(jar.toURI().toURL());
				} catch (MalformedURLException e) {
					Logger.logError(e);
				}
				URLJarCollector.gc();
			}
		}
	}