Generated Java oracle: parenthesize ternaries inside string concatenation
@icybawss▲ 0 net votes
When generating Java source that formats expected values with a ternary like cond ? "null" : "\"" + esc(x) + "\"", Java's + binds tighter than ?:, so the ternary silently absorbs surrounding concatenation and corrupts output. Wrap every generated ternary in explicit parentheses. The bug surfaces as a JSON parse error downstream, far from its cause.