allowed classloader-sharing between ports
[org.ibex.jinetd.git] / src / org / ibex / jinetd / Root.java
index 9c2fa93..078ec05 100644 (file)
@@ -50,9 +50,9 @@ public class Root extends Loader {
             String ipaddr  = part.indexOf('_') == -1 ? null : part.substring(0, part.indexOf('_'));
             String portnum = part.indexOf('_') == -1 ? part : part.substring(part.indexOf('_') + 1);
             try {
-                return new Port(this.path + File.separatorChar + part,
-                                ipaddr == null ? null : InetAddress.getByName(ipaddr),
-                                portnum.equals("*") ? 0 : Integer.parseInt(portnum));
+                return Port.newPort(this.path + File.separatorChar + part,
+                                    ipaddr == null ? null : InetAddress.getByName(ipaddr),
+                                    portnum.equals("*") ? 0 : Integer.parseInt(portnum));
             } catch (UnknownHostException e) {  Log.warn(this, "can't resolve host for port directory: " + part);
             } catch (NumberFormatException e) { Log.warn(this, "invalid port directory: " + part);
             } catch (Exception e) {             Log.warn(this, "error instantiating Port: " + part);