RFR: 8334545: runtime/ClassInitErrors/TestStackOverflowDuringInit.java fails after JDK-8294960
David Holmes
dholmes at openjdk.org
Wed Jul 3 21:50:22 UTC 2024
On Wed, 3 Jul 2024 09:18:28 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:
> Just a general comment, but I would prefere not to use a single lowercase letter `l` as a variable or argument name, as it’s easily confused with the number `1`.
I note your concern. In this case I was copying the code from `java.lang.Long`:
``` @IntrinsicCandidate
public static Long valueOf(long l) {
final int offset = 128;
if (l >= -128 && l <= 127) { // will cache
return LongCache.cache[(int)l + offset];
}
return new Long(l);
}
but I confess that I do typically use `long l` for a non-descript variable, just like I use `int i`, `char c`, `float f` etc.
Thanks for taking a look.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19894#issuecomment-2207369986
More information about the hotspot-runtime-dev
mailing list