Author: nextgens
Date: 2008-04-14 03:28:27 +0000 (Mon, 14 Apr 2008)
New Revision: 19296
Modified:
trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java
Log:
fix a potential npe in logging
Modified: trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java 2008-04-14
03:19:13 UTC (rev 19295)
+++ trunk/freenet/src/freenet/io/comm/FreenetInetAddress.java 2008-04-14
03:28:27 UTC (rev 19296)
@@ -147,7 +147,7 @@
if(!allowUnknown) throw e;
addr = null;
}
- if(logDEBUG) Logger.debug(this, "host is '"+host+"' and
addr.getHostAddress() is '"+addr.getHostAddress()+ '\'');
+ if(logDEBUG) Logger.debug(this, "host is '"+host+"' and
addr.getHostAddress() is '"+(addr != null ? addr.getHostAddress()+ '\'' : ""));
if(addr != null && addr.getHostAddress().equals(host)) {
if(logDEBUG) Logger.debug(this, '\'' +host+"' looks like an IP
address");
host = null;