When @Field is used on a declaration like String foo that does not initialize the variable, the FieldNode created by FieldASTTransformation has an initial value that is EmptyExpression rather than null, which is normally the case when declaring fields in a class without using @Field. This causes issues with 520243213bcd8c81322e8e683daa8d555bb4f484, because we insert a checked cast for EmptyExpression, which ends up breaking class generation.
See JENKINS-69899.
When
@Field
is used on a declaration likeString foo
that does not initialize the variable, theFieldNode
created byFieldASTTransformation
has an initial value that isEmptyExpression
rather thannull
, which is normally the case when declaring fields in a class without using@Field
. This causes issues with 520243213bcd8c81322e8e683daa8d555bb4f484, because we insert a checked cast forEmptyExpression
, which ends up breaking class generation.