From: adam Date: Sun, 9 Jul 2006 06:46:10 +0000 (+0000) Subject: hackage X-Git-Url: http://git.megacz.com/?p=org.ibex.jinetd.git;a=commitdiff_plain;h=423647f727a58d037a93c2fdb81b76a3dcfc0c26 hackage darcs-hash:20060709064610-5007d-e99b890028fc4625193032f3519ce8cce2b95078.gz --- diff --git a/src/org/ibex/jinetd/Host.java b/src/org/ibex/jinetd/Host.java index d745222..97942a8 100644 --- a/src/org/ibex/jinetd/Host.java +++ b/src/org/ibex/jinetd/Host.java @@ -34,29 +34,12 @@ public class Host extends TreeClassLoader { public static void init(String path, String host, int depth, ClassLoader pcl) { if (!new File(path).exists() || !new File(path).isDirectory()) return; try { - Log.warn(Host.class, "resolving " + host); - InetAddress addr = InetAddress.getByName(host); - - /* - boolean good = false; - try { - if (NetworkInterface.getByInetAddress(addr) != null) good = true; - if (!good) Log.warn(Host.class, "host " + host + "resolves to " + addr + " which is not local"); - } catch (Exception e) { - Log.warn(Host.class, "host " + host + "resolves to " + addr + " which is not local because:"); - Log.warn(Host.class, e); - } - if (!good) return; - */ - - if (new File(path + File.separatorChar + "WEB-INF").exists()) { - String pad = ""; - while(pad.length() + host.length() < 30) pad += " "; - Log.info(Main.class, pad + host + " => " + path); - hosts.put(host, pcl = new Host(path, host, pcl)); - if (!"ibex.org".equals(host)) return; - } - } catch (UnknownHostException e) { + InetAddress.getByName(host); + String pad = ""; + while(pad.length() + host.length() < 30) pad += " "; + Log.info(Main.class, pad + host + " => " + path); + hosts.put(host, pcl = new Host(path, host, pcl)); + } catch (UnknownHostException e) { if (depth >= 3) return; } String[] subdirs = new File(path).list(); diff --git a/src/org/ibex/jinetd/Main.java b/src/org/ibex/jinetd/Main.java index 7e3b08d..40c15b5 100644 --- a/src/org/ibex/jinetd/Main.java +++ b/src/org/ibex/jinetd/Main.java @@ -18,6 +18,7 @@ public class Main { System.setProperty("ibex.log.stackTraces", "true"); System.setProperty("ibex.log.notes.on", "false"); System.setProperty("org.mortbay.xml.XmlParser.NotValidating", "true"); + System.setProperty("org.mortbay.util.FileResource.checkAliases", "false"); System.setProperty("STOP.PORT", "0"); } diff --git a/src/org/ibex/jinetd/TreeClassLoader.java b/src/org/ibex/jinetd/TreeClassLoader.java index d7b4f5e..b40a74f 100644 --- a/src/org/ibex/jinetd/TreeClassLoader.java +++ b/src/org/ibex/jinetd/TreeClassLoader.java @@ -71,7 +71,10 @@ public class TreeClassLoader extends URLClassLoader { public synchronized Class findClass(String name) throws ClassNotFoundException { Class c = (Class)cache.get(name); if (c==null) c = defineClass(name); - if (c==null) throw new ClassNotFoundException(name); + if (c==null) { + Log.warn("notfound", "in " + root + ": couldn't find " + name); + throw new ClassNotFoundException(name); + } return c; }