-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace lambda with method reference in SpringBootGenerator (#3371) #3443
Replace lambda with method reference in SpringBootGenerator (#3371) #3443
Conversation
Eclipse JKube CI ReportStarted new GH workflow run for #3443 (2024-10-14T16:06:39Z) ⚙️ JKube E2E Tests (11330970226)
|
Could you please check why build is failing on JDK8 ? |
Yes sure, @rohanKanojia checked with the issue and got error as: incompatible types: invalid method reference Attaching screenshot for reference:
|
@manusa @rohanKanojia Gentle ping, Do I need to proceed with suggestion ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply.
The issue definition is wrong since it's incompatible with Java8.
Let's just remove the warning.
@@ -84,7 +84,7 @@ public List<ImageConfiguration> customize(List<ImageConfiguration> configs, bool | |||
|
|||
@Override | |||
protected Map<String, String> getEnv(boolean prePackagePhase) { | |||
return nestedGenerator.getEnv(ppp -> super.getEnv(ppp), prePackagePhase); | |||
return nestedGenerator.getEnv(super::getEnv, prePackagePhase); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, the statement is incompatible with Java 8.
Let's just remove the warning and delay the refactoring to the future:
return nestedGenerator.getEnv(super::getEnv, prePackagePhase); | |
//TODO: Java8 compatibility, remove warning. Remove annotation once baseline is set to Java11+ | |
//noinspection Convert2MethodRef | |
return nestedGenerator.getEnv(ppp -> super.getEnv(ppp), prePackagePhase); |
…-with-method-reference
…rning - 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.
…rning - 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.
|
@manusa Updated with the suggestion :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx!
Fixes #3371
Changes: