AnnotationSpec.Builder#addMemberForValue(String, Object) works perfectly for other special cases like adding F for floats as the default is double.
However it seems like the special case for longs has been forgotten. The default is int, and when a number doesn't fit in an int the compiler will say: integer number too large.
L should be added to long types, just like F is added to floats, to prevent this error.
AnnotationSpec.Builder#addMemberForValue(String, Object)
works perfectly for other special cases like addingF
for floats as the default is double. However it seems like the special case for longs has been forgotten. The default is int, and when a number doesn't fit in an int the compiler will say:integer number too large
.L
should be added to long types, just likeF
is added to floats, to prevent this error.