Nice find.
As I understand it, it's not a blocker.
It doesn't work as expected when you make a mistake.
We should fix this anyway!
But I wouldn't hold 3.0 and fix this afterwards.
Niclas, could you please fill issues to capture this?
Niclas Hedhman a écrit :
> Gang,
>
> By mistake I found a big bug...
>
>
> @Concerns( DefaultMethodsGenericSideEffect.class )
> public interface DefaultMethodsGenericSideEffects extends DefaultMethods
> {
> @Override
> default String sayHello( String name )
> {
> return greeting().get() + ", " + name + '!';
> }
> }
>
> @AppliesTo( DefaultMethodsFilter.class )
> public static class DefaultMethodsGenericSideEffect extends
> SideEffectOf<InvocationHandler>
> implements InvocationHandler
> {
>
>
>
> Do you see it?? Point is that there is no warning or anything, but the
> SideEffect is applied as a Concern, and the value returned from the
> SideEffect is the result of the method call.
>
> The description of the bug should be something like; "Concerns lacking
> @ConcernFor injection field is not rejected as a Concern" and the same
> thing is like for SideEffects, but I haven't tested that yet.
>
>
> Cheers