Not clear sonar warning: Move this left curly brace to the end of previous line of code

Somehow for some methods sonar gives the error, even if the left curly brace is in the end of the previous line. Not sure what is wrong
Exact copy of the code, which gives the error

	@JsonIgnore
	public Something getSomething () { <--Move this left curly brace to the end of previous line of code.
		....
	}
1 Like

Hey there!

We have a few FPs in the backlog related to S1105. One is this one (S1105 should not report on record mehods followed by non-method members).

Without seeing more of your code, it’s hard to know whether it applies. Could you check that ticket, see if it applies, and if not share a wider range of code?

1 Like

Thanks for the reply, sounds like link is missing, can you maybe update the message?

Ah, sorry about that. I’ve updated the link.

Yes, it is very similar, the only thing is that instead of

    public interface Inner { // If the interface is removed, the FP disappears
    }

I have another public record class

I’ll flag this for attention just to make sure this case is covered.

1 Like