S3252 FP when use builder to build subclass


We use SonarQube Community Edition * Version 9.4 (build 54424).

When we use subclass’s builder to build a instance, S3252 report a false postive.
Sample code
Base Class

@SuperBuilder(toBuilder = true)
@JsonTypeInfo(use = JsonTypeInfo.Id.MINIMAL_CLASS)
public class BaseReferenceInfo {


@SuperBuilder(toBuilder = true)
public class OpenMemoInfo extends BaseReferenceInfo {
    private long id;
    private String remarkType;

java:S3252 report issue on OpenMemoInfo.builder()


Hello @willing_happy,

Thanks for the report! Indeed this would look like a false positive. I’ve not been able to reproduce the issue so far, however. Could you provide a small reproducer project in which you can observe the FP based on which we can investigate further?