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

[scr 1.4] constructor for injection must be public #1218

Open
laeubi opened this issue Apr 4, 2024 · 4 comments
Open

[scr 1.4] constructor for injection must be public #1218

laeubi opened this issue Apr 4, 2024 · 4 comments
Assignees

Comments

@laeubi
Copy link
Contributor

laeubi commented Apr 4, 2024

If a constructor is used for injection that is package protected Felix SCR complains:

Constructor with 3 arguments not found. Component will fail.

example is

MyComponent(BundleContext ctx, @Reference Service1 s1, @Reference Service2 s1) {

}

This can be seen in the spec here:

If the constructor is not public, then the constructor must not be considered.

PDE should emit an error in this case to the user.

@opcoach opcoach added the good first issue Good for newcomers label Sep 30, 2024
@Tilak-21
Copy link

Tilak-21 commented Oct 5, 2024

I'm working on this.

@HannesWell
Copy link
Member

Great. You are one of the students from CodeDays, aren't you?

Much success on this task and don't hesitate to ask for help if you need any.

@EverettHanke
Copy link

Hey there everyone. I am a code day student working with @Tilak-21 on this ticket. After some time searching we have found what we believe is the location to write our solution. AnnotationVisitor.java line 258.

We were curious if anyone here might be able to confirm that this is the location we need to apply a solution to?

@EverettHanke
Copy link

Reaching out here to see if we can clear up any misunderstandings about this ticket. I submitted what I believed to be a solution but it didn't fully match the parameters of what this ticket asks of. For me and the team I'm working with this ticket seems very vague and because of that it's been difficult to replicate exactly what we are trying to solve.

If we can get some more specifics so we can clear up the miscommunication and have a clearer path to work with. Our CodeDay mentorship ended weeks ago but I still want to finish what my group started and see these issues through. CodeDay or no CodeDay.

What I am misunderstanding can be found here Any help is appreciated.

I do want to involve myself further than just codeday and join the open source scene but I really need someone to take me under their wing so to speak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants