i have a member like this in a serializable class:
private final Map<String, List<T>> categoryMap = Maps.newHashMap();
the class has the following type-bounds.
<T extends Serializable>
I use findbugs to check for mistakes in my code, and it shows me that member as “not (guaranteed to be) serializable”.
Because your serializable class contains the following member
here
Tcan be any classFoo, which isn’t guaranteed to be Serializable and so the warning/suggestion/eye openerIf you are expecting it to be serializable in all the cases than make it
and if you don’t want to seralize that field at all simply mark
transient