I2PTunnel: fix NPE in I2PTunnelConnectClient

This commit is contained in:
sponge
2011-02-11 11:07:33 +00:00
parent 1ad005ec6f
commit 8ec3e58e27
3 changed files with 7 additions and 1 deletions

View File

@ -169,6 +169,9 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
// Use this rather than BufferedReader because we can't have readahead, // Use this rather than BufferedReader because we can't have readahead,
// since we are passing the stream on to I2PTunnelRunner // since we are passing the stream on to I2PTunnelRunner
line = DataHelper.readLine(in); line = DataHelper.readLine(in);
if(line == null) {
line = ''; // prevent NPE, Is this what we need to do?
}
line = line.trim(); line = line.trim();
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug(getPrefix(requestId) + "Line=[" + line + "]"); _log.debug(getPrefix(requestId) + "Line=[" + line + "]");

View File

@ -1,3 +1,6 @@
2011-02-11 sponge
* I2PTunnel: fix NPE in I2PTunnelConnectClient
2011-02-10 sponge 2011-02-10 sponge
* I2CP: fix NPE in QueuedClientConnectionRunner * I2CP: fix NPE in QueuedClientConnectionRunner

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 7; public final static long BUILD = 8;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";