Fixes #5553 : Skip UnnecessaryOptionalGet when lambda parameter is unnamed by mirkoalicastro · Pull Request #5649 · google/error-prone (original) (raw)

@mirkoalicastro

@mirkoalicastro mentioned this pull request

Mar 24, 2026

cushon

@mirkoalicastro

@mirkoalicastro

@mirkoalicastro

copybara-service Bot pushed a commit that referenced this pull request

Apr 10, 2026

@mirkoalicastro

…named

UnnecessaryOptionalGet suggested replacing .get() with the lambda parameter name, but the parameter _ (unnamed variable, Java 22+) produces uncompilable code since _ cannot be referenced.

Changes:

Fixes #5553

Fixes #5649

FUTURE_COPYBARA_INTEGRATE_REVIEW=#5649 from mirkoalicastro:mirkoalicastro/fix-unnecessary-optional-get-unnamed-variable bdcd042 PiperOrigin-RevId: 897687911

copybara-service Bot pushed a commit that referenced this pull request

Apr 10, 2026

@mirkoalicastro

…named

UnnecessaryOptionalGet suggested replacing .get() with the lambda parameter name, but the parameter _ (unnamed variable, Java 22+) produces uncompilable code since _ cannot be referenced.

Changes:

Fixes #5553

Fixes #5649

FUTURE_COPYBARA_INTEGRATE_REVIEW=#5649 from mirkoalicastro:mirkoalicastro/fix-unnecessary-optional-get-unnamed-variable bdcd042 PiperOrigin-RevId: 897687291

copybara-service Bot pushed a commit that referenced this pull request

Apr 13, 2026

@mirkoalicastro

…named

UnnecessaryOptionalGet suggested replacing .get() with the lambda parameter name, but the parameter _ (unnamed variable, Java 22+) produces uncompilable code since _ cannot be referenced.

Changes:

Fixes #5553

Fixes #5649

FUTURE_COPYBARA_INTEGRATE_REVIEW=#5649 from mirkoalicastro:mirkoalicastro/fix-unnecessary-optional-get-unnamed-variable bdcd042 PiperOrigin-RevId: 897687911

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})