Author: toad
Date: 2008-12-16 23:30:24 +0000 (Tue, 16 Dec 2008)
New Revision: 24394

Modified:
   trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java
Log:
Can't dropHostname() if _address == null


Modified: trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java   2008-12-16 
23:29:51 UTC (rev 24393)
+++ trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java   2008-12-16 
23:30:24 UTC (rev 24394)
@@ -370,8 +370,10 @@
        }
 
        public FreenetInetAddress dropHostname() {
+               if(_address == null)
+                       throw new IllegalStateException("Can't dropHostname() 
if no address!");
                if(hostname != null) {
-                       return new FreenetInetAddress(getAddress());
+                       return new FreenetInetAddress(_address);
                } else return this;
        }
 

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to