Here's my understand from reading through the spec and working backwards from the result you got. It comes down to the type of the third operand of the f2 inner conditional is null type while the type of the third operand of the f2 outer conditional is deemed to be Float.
Note: Its important to remember that the determination of type and the insertion of boxing/unboxing code is done at compile-time. Actual execution of boxing/unboxing code is done at run-time.
Float f1 = (false ? 1.0f : null);
Float f2 = (false ? 1.0f : (false ? 1.0f : null));
The f1 conditional and the f2 inner conditional: (false ? 1.0f : null)
The f1 conditional and the f2 inner conditional are identical: (false ? 1.0f : null). The operand types in the f1 conditional and the f2 inner conditional are:
type of second operand = float
type of third operand = null type (§4.1)
Most of the rules in §15.25 are passed up and this final evaluation is indeed applied:
Otherwise, the second and third operands are of types S1 and S2 respectively. Let T1 be the type that results from applying boxing conversion to S1, and let T2 be the type that results from applying boxing conversion to S2. The type of the conditional expression is the result of applying capture conversion (§5.1.10) to lub(T1, T2) (§15.12.2.7).
S1 = float
S2 = null type
T1 = Float
T2 = null type
type of the f1 and f2 inner conditional expressions = Float
Since for f1, the assignment is to a Float reference variable, the result of the expression (null) is successfully assigned.
For f2 outer conditional: (false ? 1.0f : [f2 inner conditional])
For the f2 outer conditional, the types are:
type of second operand = float
type of third operand = Float
Note the difference in operand types compared to the f1/f2 inner conditionals that reference the null literal directly (§4.1). Because of this difference of having 2 numeric-convertible types, this rule from §15.12.2.7 applies:
Because of the unboxing conversion performed on the result of the f2 inner conditional (null), a NullPointerException is raised.