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

@Resource is always marked as shareable [SPR-10931] #15559

spring-issuemaster opened this issue Sep 24, 2013 · 0 comments


Copy link

@spring-issuemaster spring-issuemaster commented Sep 24, 2013

Łukasz Rekucki opened SPR-10931 and commented

The following code in effectively ignores "shareable" flag on @Resource annotation:

private class ResourceElement extends LookupElement {
    protected boolean shareable = true;

    public ResourceElement(Member member, PropertyDescriptor pd) {
        super(member, pd);
    protected void initAnnotation(AnnotatedElement ae) {
        // ...
        this.shareable = resource.shareable();

The problem is that initAnnotation() is called from super, thus the field default is assigned later.

Affects: 3.1.2, 4.0 M3

Referenced from: commits 7bc3e3b, 0a31892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.