Rule S1170 should not raise an issue, if initialization accesses instance members.
public abstract class C
{
private final C c = this; // FP
private final X x = getX(); // FP
private final String s = "abcdef"; // Correctly raise an issue!
protected abstract X getX();
}
Thank you for reporting this false positive. I totally agree that we should fix it. Attributes can’t be static if their initialization references instance members.
Here is the ticket I created: SONARJAVA-3617
While I agree that we should not report an issue for such cases, I can only reproduce a FP for private final C c = this; but not for the second private final X x = getX();.