First, I had a class line by line:
public class MyClass implements Serializable { private List<Role> roles; }
SonarQube noted that List , a member of the serializable class, is not serializable. Fair enough, I will switch to a serializable implementation of List as an ArrayList .
public class MyClass implements Serializable { private ArrayList<Role> roles; }
At this point, SonarQube is unhappy that βroles should use an interface, such as a List, and not as an implementation of the ArrayList type, which returns me to where I was originally.
Is there a way out of this cycle?
Bill source share