Skip to content
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

SpringBootGenerator: Lambda can be replaced with method reference #3371

Closed
manusa opened this issue Sep 6, 2024 · 5 comments · Fixed by #3443
Closed

SpringBootGenerator: Lambda can be replaced with method reference #3371

manusa opened this issue Sep 6, 2024 · 5 comments · Fixed by #3443
Assignees
Labels
first-timers-only Is this your first time contributing? This could be a good place to start! good first issue Good for newcomers Hacktoberfest Issues accountable for the Hacktoberfest
Milestone

Comments

@manusa
Copy link
Member

manusa commented Sep 6, 2024

Description

The class SpringBootGenerator presents the issue: Lambda can be replaced with method reference.

The following line:

return nestedGenerator.getEnv(ppp -> super.getEnv(ppp), prePackagePhase);

should be changed to:

        return nestedGenerator.getEnv(super::getEnv, prePackagePhase);

🔴 Before you start 🔴

👇 👇 👇 👇 👇 👇 👇 👇 👇 👇 👇 👇 👇 👇 👇 👇

Make sure you read the contributing guide first.

Pay special attention to the ECA agreement section and the requirement to sign-off your commit.

This is a first-timers-only issue. These issues are especially created for contributors who are contributing to the project for the first time.

If you have already contributed to this project in the past, please don't ask to be assigned one of these issues and look for good-first-issues or help-wanted issues instead in order to continue you contributor journey in the project.

@manusa manusa added first-timers-only Is this your first time contributing? This could be a good place to start! good first issue Good for newcomers labels Sep 6, 2024
@Kishore1K
Copy link
Contributor

Can I take this issue

@manusa
Copy link
Member Author

manusa commented Sep 11, 2024

Hi @Kishore1K, first-timers-only tagged issues are created for newcomers who are contributing to the project for the first time so that they can complete legal requirements and get familiar with project.

Now that you’ve completed that step, I would advise you to look into issues tagged with good first issue/help wanted labels . Or maybe create some new issue if you find something that should be fixed.

Please check the contributing guide for more information.

@pujakarakoti07
Copy link
Contributor

Can I resolve this issue?

@manusa
Copy link
Member Author

manusa commented Sep 16, 2024

Hi @pujakarakoti07, I have just assigned #3368 to you.

@manusa manusa added the Hacktoberfest Issues accountable for the Hacktoberfest label Sep 25, 2024
@Aryant-Tripathi
Copy link
Contributor

@manusa May I be allowed to work on this issue?

@manusa manusa added this to the 1.18.0 milestone Oct 16, 2024 — with automated-tasks
manusa pushed a commit that referenced this issue Oct 16, 2024
…ingBootGenerator (#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-timers-only Is this your first time contributing? This could be a good place to start! good first issue Good for newcomers Hacktoberfest Issues accountable for the Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants