Author: nextgens
Date: 2007-11-09 18:06:06 +0000 (Fri, 09 Nov 2007)
New Revision: 15728
Modified:
trunk/freenet/src/freenet/clients/http/StartupToadletServer.java
Log:
cleanup: We probably don't need that at all
Modified: trunk/freenet/src/freenet/clients/http/StartupToadletServer.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StartupToadletServer.java
2007-11-09 17:48:29 UTC (rev 15727)
+++ trunk/freenet/src/freenet/clients/http/StartupToadletServer.java
2007-11-09 18:06:06 UTC (rev 15728)
@@ -126,47 +126,6 @@
this.executor = executor;
formPassword = String.valueOf(this.getClass().hashCode());
- List themes = new ArrayList();
- try {
- URL url = getClass().getResource("staticfiles/themes/");
- URLConnection urlConnection = url.openConnection();
- if (url.getProtocol().equals("file")) {
- File themesDirectory = new
File(URLDecoder.decode(url.getPath(), "ISO-8859-1").replaceAll("\\|", ":"));
- File[] themeDirectories = themesDirectory.listFiles();
- for (int themeIndex = 0; (themeDirectories != null) &&
(themeIndex < themeDirectories.length); themeIndex++) {
- File themeDirectory = themeDirectories[themeIndex];
- if (themeDirectory.isDirectory() &&
!themeDirectory.getName().startsWith(".")) {
- themes.add(themeDirectory.getName());
- }
- }
- } else if (urlConnection instanceof JarURLConnection) {
- JarURLConnection jarUrlConnection = (JarURLConnection)
urlConnection;
- JarFile jarFile = jarUrlConnection.getJarFile();
- Enumeration entries = jarFile.entries();
- while (entries.hasMoreElements()) {
- JarEntry entry = (JarEntry) entries.nextElement();
- String name = entry.getName();
- if
(name.startsWith("freenet/clients/http/staticfiles/themes/")) {
- name =
name.substring("freenet/clients/http/staticfiles/themes/".length());
- if (name.indexOf('/') != -1) {
- String themeName = name.substring(0,
name.indexOf('/'));
- if (!themes.contains(themeName)) {
- themes.add(themeName);
- }
- }
- }
- }
- }
- } catch (IOException ioe1) {
- Logger.error(this, "error creating list of themes", ioe1);
- } catch (NullPointerException npe) {
- Logger.error(this, "error creating list of themes", npe);
- } finally {
- if (!themes.contains("clean")) {
- themes.add("clean");
- }
- }
-
// hack ... we don't have the config framework yet
try {
SimpleFieldSet config = SimpleFieldSet.readFrom(configFile, false,
false);