eclipse-pde / eclipse.pde

Eclipse Public License 2.0
28 stars 81 forks source link

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

Open laeubi opened 8 months ago

laeubi commented 8 months ago

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.

Tilak-21 commented 1 month ago

I'm working on this.

HannesWell commented 1 month ago

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 commented 1 month ago

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?