Don't output ProtocolVersion toString() in decode errors

This information is extremely technical in nature and the data is already
available for developer use by examining StateRegistry.
This commit is contained in:
Andrew Steinborn
2018-09-04 00:50:24 -04:00
parent c5dcfb1ba6
commit c021eb2020

View File

@@ -38,11 +38,11 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf> {
packet.decode(msg, direction, protocolVersion.id); packet.decode(msg, direction, protocolVersion.id);
} catch (Exception e) { } catch (Exception e) {
throw new CorruptedFrameException("Error decoding " + packet.getClass() + " Direction " + direction throw new CorruptedFrameException("Error decoding " + packet.getClass() + " Direction " + direction
+ " Protocol " + protocolVersion + " State " + state + " ID " + Integer.toHexString(packetId), e); + " Protocol " + protocolVersion.id + " State " + state + " ID " + Integer.toHexString(packetId), e);
} }
if (msg.isReadable()) { if (msg.isReadable()) {
throw new CorruptedFrameException("Did not read full packet for " + packet.getClass() + " Direction " + direction throw new CorruptedFrameException("Did not read full packet for " + packet.getClass() + " Direction " + direction
+ " Protocol " + protocolVersion + " State " + state + " ID " + Integer.toHexString(packetId)); + " Protocol " + protocolVersion.id + " State " + state + " ID " + Integer.toHexString(packetId));
} }
out.add(packet); out.add(packet);
} }