Description
We noticed an OutOfMemory error in one of our client applications (GUI) when trying to decode messages that require resolving.
It turns out the use of Schema.toString(true) in method generate(Schema, Schema, Map<LitS,Symbol>) (and to a less extent resolveRecords(Schema, Schema, Map<LitS,Symbol>) too) in our very-large-Schema use-case is the main reason for this.
We found that patching this class to use Schema.getFullName() instead of Schema.toString(true) resolves our issue, and we thought this might benefit other users (and shouldn't affect anybody as this message is not actually being logged/reported).
The change involves changing this (in method generate()):
return Symbol.error("Found " + writer.toString(true) + ", expecting " + reader.toString(true));
into this:
return Symbol.error("Found " + writer.getFullName() + ", expecting " + reader.getFullName());
And this (in method resolveRecords()):
result = Symbol.error("Found " + writer.toString(true) + ", expecting " + reader.toString(true));
into this:
result = Symbol.error("Found " + writer.getFullName() + ", expecting " + reader.getFullName());
Thanks in advance,
Hernan