-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
BugAn error that causes the feature to behave differently than what was expected based on design.An error that causes the feature to behave differently than what was expected based on design.
Description
Description
I was reading generated protobuf parser code and saw the comment // There's no more fields. Stop the parsing loop. and it made we wonder if this is happening in normal parsing. If it is then we should add a if check on remaining() and avoid the exception for normal operations.
final int tag;
try {
// Read the "tag" byte which gives us the field number for the next field to read
// and the wire type (way it is encoded on the wire).
tag = input.readVarInt(false);
} catch (EOFException e) {
// There's no more fields. Stop the parsing loop.
break;
}
Steps to reproduce
Run parsing test with debugger on the break; line and find if it ever gets reached.
Additional context
No response
Hedera network
No response
Version
0.12.10
Operating system
None
Metadata
Metadata
Assignees
Labels
BugAn error that causes the feature to behave differently than what was expected based on design.An error that causes the feature to behave differently than what was expected based on design.