RFR: 8261669: Add lint warning for widening primitive conversions that lose information

Archie Cobbs acobbs at openjdk.org
Fri Feb 21 16:51:38 UTC 2025


On Fri, 21 Feb 2025 11:31:34 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

> You may want to take a look at `java.lang.runtime.ExactConversionsSupport`.

Thanks! That's exactly what I needed. Fixed in 92b479a94ff.

> There are several reasons that it would be ideal to hold this PR off, for now. There is an ongoing effort to study conversions and contexts holistically in Java and possibly regularizing various contexts across the board.
> 
> That study will build upon the implementation (and terminology) realised by JEP 488 regarding exact and lossy conversions which might well include the warnings contained in your PR.
> 
> I am re-assigning this to me on JBS and I will link back to it when the new JBS ticket is created.

OK sounds good - it's all yours :) I will close this PR.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23718#issuecomment-2675056823


More information about the build-dev mailing list