Skip to content

[bean completion proposals] beans of type Object results in no constructor param being generated #1468

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
martinlippert opened this issue Feb 6, 2025 · 1 comment
Assignees
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: code completion type: bug

Comments

@martinlippert
Copy link
Member

It looks like if the bean that I select from the completion is of type java.lang.Object, there is no constructor parameter being generated for it and the inserted field gets the name object instead of the name of the bean.

This is the result after applying the completion:

public class TestBean2 {

    private final Object object;

    public void foo() {
        myBean<*>
    }

}

after applying the bean completion for myBean, where myBean is of type java.lang.Object.

@martinlippert martinlippert added for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: code completion type: bug labels Feb 6, 2025
@martinlippert martinlippert added this to the 4.29.0.RELEASE milestone Feb 6, 2025
@BoykoAlex
Copy link
Contributor

Fixed with 6a9c390. The problem was that field name for a bean was coming from the type simple name rather then bean name in the index.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: code completion type: bug
Projects
None yet
Development

No branches or pull requests

2 participants