Language fixups.

This commit is contained in:
dg2-new
2015-06-08 16:14:08 +00:00
parent e8f4e19bac
commit fa8c390267
39 changed files with 107 additions and 104 deletions

View File

@@ -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);
}

View File

@@ -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;
}

View File

@@ -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();

View File

@@ -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,

View File

@@ -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);
}

View File

@@ -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);