forked from I2P_Developers/i2p.i2p
Language fixups.
This commit is contained in:
@@ -49,7 +49,7 @@ public class DataMessage extends FastI2NPMessageImpl {
|
||||
long size = DataHelper.fromLong(data, curIndex, 4);
|
||||
curIndex += 4;
|
||||
if (size > MAX_SIZE)
|
||||
throw new I2NPMessageException("wtf, size=" + size);
|
||||
throw new I2NPMessageException("too large msg, size=" + size);
|
||||
_data = new byte[(int)size];
|
||||
System.arraycopy(data, curIndex, _data, 0, (int)size);
|
||||
}
|
||||
|
||||
@@ -357,8 +357,8 @@ public class DeliveryInstructions extends DataStructureImpl {
|
||||
int offset = 0;
|
||||
offset += getAdditionalInfo(rv, offset);
|
||||
if (offset != additionalSize)
|
||||
//_log.log(Log.CRIT, "wtf, additionalSize = " + additionalSize + ", offset = " + offset);
|
||||
throw new IllegalStateException("wtf, additionalSize = " + additionalSize + ", offset = " + offset);
|
||||
//_log.log(Log.CRIT, "size mismatch, additionalSize = " + additionalSize + ", offset = " + offset);
|
||||
throw new IllegalStateException("size mismatch, additionalSize = " + additionalSize + ", offset = " + offset);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ public class I2NPMessageReader {
|
||||
_listener.disconnected(I2NPMessageReader.this);
|
||||
cancelRunner();
|
||||
} catch (Exception e) {
|
||||
_log.log(Log.CRIT, "wtf, error reading", e);
|
||||
_log.log(Log.CRIT, "error reading msg!", e);
|
||||
_listener.readError(I2NPMessageReader.this, e);
|
||||
_listener.disconnected(I2NPMessageReader.this);
|
||||
cancelRunner();
|
||||
|
||||
@@ -62,7 +62,7 @@ public class TunnelGatewayMessage extends FastI2NPMessageImpl {
|
||||
if (_msg != null)
|
||||
throw new IllegalStateException();
|
||||
if (msg == null)
|
||||
throw new IllegalArgumentException("wtf, dont set me to null");
|
||||
throw new IllegalArgumentException("dont set me to null!");
|
||||
_msg = msg;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public class TunnelGatewayMessage extends FastI2NPMessageImpl {
|
||||
//handler.readMessage(data, curIndex);
|
||||
//_msg = handler.lastRead();
|
||||
//if (_msg == null)
|
||||
// throw new I2NPMessageException("wtf, message read has no payload?");
|
||||
// throw new I2NPMessageException("impossible? message read has no payload?!");
|
||||
|
||||
// NEW WAY save lots of effort at the IBGW by reading as an UnknownI2NPMessage instead
|
||||
// This will save a lot of object churn and processing,
|
||||
|
||||
@@ -48,7 +48,7 @@ public class UnknownI2NPMessage extends FastI2NPMessageImpl {
|
||||
throw new IllegalStateException();
|
||||
if (type != _type) throw new I2NPMessageException("Message type is incorrect for this message");
|
||||
if (dataSize > MAX_SIZE)
|
||||
throw new I2NPMessageException("wtf, size=" + dataSize);
|
||||
throw new I2NPMessageException("size mismatch, too big, size=" + dataSize);
|
||||
_data = new byte[dataSize];
|
||||
System.arraycopy(data, offset, _data, 0, dataSize);
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ public class RouterInfo extends DatabaseEntry {
|
||||
*/
|
||||
protected byte[] getBytes() throws DataFormatException {
|
||||
if (_byteified != null) return _byteified;
|
||||
if (_identity == null) throw new DataFormatException("Router identity isn't set? wtf!");
|
||||
if (_identity == null) throw new DataFormatException("Router identity isn't set?!");
|
||||
|
||||
//long before = Clock.getInstance().now();
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream(2*1024);
|
||||
|
||||
Reference in New Issue
Block a user