When I run the code through FindBugs, to get smelly bits, I get
<B> Error: class com.MyClass defines an intransitive nonserializable instance field of someSet Pattern ID: SE_BAD_FIELD, type: Se, category: BAD_PRACTICE
I know that set does not implement serialization, but a HashSet does, and therefore it is initialized then and there. I thought it was good practice :( but apparently not
public class Myclass extends { @Transient private Set<String> someSet = new HashSet<String>(); ........... }
Any help would be great. Low level warning, but would like to know why?
source share