mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
PrimitiveDelegate generated code via "$LF" for Float and "(double) $L" for Double, which emit the value's toString() verbatim. For NaN and infinities this produced non-compilable source such as "NaNF" or "(double) Infinity", causing the generated AOT sources to fail to compile. Detect NaN (via isNaN, since NaN is never equal to itself) and the positive/negative infinities, emitting the corresponding constant field references (Float.NaN, Double.POSITIVE_INFINITY, etc.) through the "$T" placeholder. Finite values keep their existing handling. Signed-off-by: junhyeong9812 <pickjog@gmail.com>