From 1aeb58d8337beefa89b1e77c30e6a3d85633e152 Mon Sep 17 00:00:00 2001 From: Aryant Tripathi <60316716+Aryant-Tripathi@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:10:55 +0530 Subject: [PATCH] chore: suppressed replace lambda with method reference warning in SpringBootGenerator (#3371) (3443) Replace lambda with method reference in SpringBootGenerator (#3371) --- Merge branch 'eclipse-jkube:master' into 3371/refactor/replace-lambda-with-method-reference --- fix: address Java 8 compatibility with suppressed method reference warning - Suppressed the Convert2MethodRef warning to avoid issues until the project baseline is upgraded to Java 11. - Added a TODO comment to revisit and remove this workaround once the project moves to Java 11 or higher. This ensures that the code remains compatible with Java 8 while avoiding unnecessary warnings. --- fix: address Java 8 compatibility with suppressed method reference warning - Suppressed the Convert2MethodRef warning to avoid issues until the project baseline is upgraded to Java 11. - Added a TODO comment to revisit and remove this workaround once the project moves to Java 11 or higher. This ensures that the code remains compatible with Java 8 while avoiding unnecessary warnings. --- .../jkube/springboot/generator/SpringBootGenerator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jkube-kit/jkube-kit-spring-boot/src/main/java/org/eclipse/jkube/springboot/generator/SpringBootGenerator.java b/jkube-kit/jkube-kit-spring-boot/src/main/java/org/eclipse/jkube/springboot/generator/SpringBootGenerator.java index 41d01bee0f..967aaaa1b5 100644 --- a/jkube-kit/jkube-kit-spring-boot/src/main/java/org/eclipse/jkube/springboot/generator/SpringBootGenerator.java +++ b/jkube-kit/jkube-kit-spring-boot/src/main/java/org/eclipse/jkube/springboot/generator/SpringBootGenerator.java @@ -84,6 +84,9 @@ public List customize(List configs, bool @Override protected Map getEnv(boolean prePackagePhase) { + //TODO: Java8 compatibility, remove warning. + // Remove annotation once baseline is set to Java11+ + //noinspection Convert2MethodRef return nestedGenerator.getEnv(ppp -> super.getEnv(ppp), prePackagePhase); }