Use 'unused' in noncompliant
Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>
This commit is contained in:
parent
c2c26fa255
commit
5181655269
@ -9,11 +9,11 @@ Library authors often design APIs to be versatile, enabling them to handle diver
|
||||
==== Noncompliant code example
|
||||
[source,java,diff-id=1,diff-type=noncompliant]
|
||||
----
|
||||
BiFunction<Integer,Integer,Integer> f = (a, b) -> a; // Noncompliant
|
||||
BiFunction<Integer,Integer,Integer> f = (a, unused) -> a; // Noncompliant
|
||||
|
||||
// ...
|
||||
|
||||
firstValueMap.merge(event.id, event.value, (oldValue, newValue) -> oldValue); // Noncompliant
|
||||
firstValueMap.merge(event.id, event.value, (oldValue, unused) -> oldValue); // Noncompliant
|
||||
----
|
||||
|
||||
==== Compliant solution
|
||||
|
Loading…
x
Reference in New Issue
Block a user