All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.java.rules.squid.S1611.html Maven / Gradle / Ivy

There is a newer version: 8.6.0.37351
Show newest version

There are two possible syntaxes for a lambda having only one input parameter with an inferred type: with and without parentheses around that single parameter. The simpler syntax, without parentheses, is more compact and readable than the one with parentheses, and is therefore preferred.

Note that this rule is automatically disabled when the project's java.source.version is lower than 8.

Noncompliant Code Example

(x) -> x * 2

Compliant Solution

x -> x * 2




© 2015 - 2025 Weber Informatics LLC | Privacy Policy