openrewrite / rewrite-static-analysis

OpenRewrite recipes for identifying and fixing static analysis issues.
Apache License 2.0
27 stars 43 forks source link

Issue discovered on `src/main/java/org/springframework/data/repository/query/Parameters.java` with `Use method references in lambda` #15

Open moderne-meeseeks[bot] opened 1 year ago

moderne-meeseeks[bot] commented 1 year ago

Problem

Describe the issue you are experiencing.

Expected behavior

Describe what you expected to see.

Example diff

From: src/main/java/org/springframework/data/repository/query/Parameters.java

        this.pageableIndex = pageableIndexTemp;
    this.sortIndex = sortIndexTemp;
    this.dynamicProjectionIndex = dynamicProjectionTemp;
-       this.bindable = Lazy.of(() -> (S) this);
+       this.bindable = Lazy.of({{8ba5867a-1e2c-4faf-8e0c-03935957b7a2}}() -> (S) this{{8ba5867a-1e2c-4faf-8e0c-03935957b7a2}});
}

private S getBindable() {

Recipes in example diff:

References:


This issue originally created by @jkschneider on: https://github.com/moderneinc/support-public/issues/16

moderne-meeseeks[bot] commented 1 year ago

This comment originially written by @ on: