I’m running server 8.9.8.54436, sonarlint 6.7.0.45926, idea IU-213.7172.25 (2021.3.3) and I just noticed this behaviour as well.
In my case I’m getting 1948 on:
class X implements Serializable {
...
private ArrayList<Y> y = new ArrayList<>();
}
where Y is serializable. I’ve also noticed that if I move the Y class so that it is an inner class of X then the false violation goes away.
I’ve also noticed some scenarios where I am not getting java:S1948 violations when I expect to. These scenarios used to throw violations before our upgrade to 8.9.8 but no longer do. Upgrade was from 8.6.