S1612: incorrect quickfix

Hello,

This code sample raises an issue with a quick fix in the allMatch predicate:

var list = List.of("x1", "x2");
var rslt = list.stream().allMatch(it -> "x1".equals(it));

The quick fix is supposed to use ::equals, but the left part is missing

var list = List.of("x1", "x2");
var rslt = list.stream().allMatch(::equals);

Tested in Eclipse (Sonarlint 11.26.0.84482), connected mode, SonarQube EE 2026.1 (119033)

Gilles

1 Like

Hi Gilles,

This is Java, right?

 
Thx,
Ann

Sorry, forgot to mention that. Yes, this is Java.

1 Like

Hi,

The other one you reported today is only implemented for Java, but that’s not the case for this one. :sweat_smile:

This is flagged for the language team.

 
Ann

Good morning Gilles,

Thank you for pointing this out. This is indeed a bug in the quick fix logic; we will get to work on a fix for this.

We appreciate the report!

Best regards,

Romain

1 Like