RFR: 8236850: Operations on constant List/Set.of(element) instances does not consistently constant fold

Claes Redestad claes.redestad at oracle.com
Mon Jan 13 21:23:45 UTC 2020


On 2020-01-13 22:18, Paul Sandoz wrote:
> That’s fine, it was really for informational purposes in case it comes in handy later on.

Got it.

> Speculating: if we had such a public method (with minimal dependencies) I suspect we would reach for it in this case even if overkill.  It reduces the cognitive load, but as a downside it would not afford us the opportunity of a slice Pi:-)

Not sure it'd pull its own weight as a public API, but refactoring to a
shared internal utility might be a good start?

/Claes


More information about the core-libs-dev mailing list