You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More recent versions of Java introduce errors when invoking unqualified methods called "yield". For example, in Java 17:
error: invalid use of a restricted identifier 'yield'
final DecimalFloatDecoder yield = yield();
^
(to invoke a method called yield, qualify the yield with a receiver or type name)
Our build process fails on warnings, and builds decoders written using the JavaGenerator.
Those decoders include a appendTo method, which has patterns like:
final DecimalFloatDecoder yield = yield();
if (yield != null)
{
yield.appendTo(builder);
}
where the method names are based on the field names. When we have a field called yield - which we need, that's the domain concept, this yields (if you'll pardon the pun) this compiler error.
One simple fix is - if it were instead:
final DecimalFloatDecoder yield = this.yield();
if (yield != null)
{
yield.appendTo(builder);
}
it would not raise the error.
I'll start by trying to create a unit test to reproduce the problem.