This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244182 - NetBeans does not perform type-safe bean resolution when injecting into constructors.
Summary: NetBeans does not perform type-safe bean resolution when injecting into const...
Status: REOPENED
Alias: None
Product: javaee
Classification: Unclassified
Component: CDI (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-29 20:17 UTC by chrisjr
Modified: 2016-10-17 19:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chrisjr 2014-04-29 20:17:32 UTC
Consider this CDI bean declaration:

public class MyBean {

    private final String value;
    private String otherValue;

    MyBean() {
        this(null);
    }

    @Inject
    MyBean(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public String getOtherValue() {
        return otherValue;
    }

    @Inject
    public void setOtherValue(String other) {
        this.otherValue = value;
    }

}

NetBeans does not display the blue (I) icon next to the MyBean(String) constructor, although it does for the setOtherValue(String) method. However, both are injection targets.
Comment 1 Martin Balin 2016-07-07 08:56:51 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss