Skip to content

Added support for @Inject to work on constructors #155

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

Merged
merged 2 commits into from
Jun 1, 2024

Conversation

surajkumar
Copy link
Contributor

Alongside adding @Inject to fields, you can also now add it to constructors.

Example:

public class ChatGPTCommand {
    private final ChatGPT chatGPT;

    @Inject
    public ChatGPTCommand(ChatGPT chatGPT) {
        this.chatGPT = chatGPT;
    }

...

Copy link

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@surajkumar surajkumar merged commit 7e75728 into main Jun 1, 2024
4 of 5 checks passed
@surajkumar surajkumar deleted the constructor-injection branch June 1, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant