I have just closed the bug report, since it is actually an incorrect test case.

    @Concerns( CapitalizeConcern.class )
    public interface Nameable
    {
        @Capitalized
        Property<String> name();
    }

    @AppliesTo( Capitalized.class )
    public static abstract class CapitalizeConcern
        extends ConcernOf<Property<String>>
        implements Property<String>
    {
        public void set( String newValue )
            throws IllegalArgumentException
        {
            newValue = newValue.toUpperCase();
            next.set( newValue );
        }
    }

where the intention of the test is to apply the concern on the set() method.

However, as it is written, the @Capitalized annotation is on the
name() method, and hence being at the "wrong" level. To make it work
as intended, an implementation of Nameable is needed, where the set()
method is provided and marked @Capitalized.


BUT, I wonder if we should open a "New Feature" request, where the
above will actually work. I.e. Assuming that the above fairly common,
and the solution rather messy, it would be neat to allow the above
kind of pattern.

So, should we add this, or not, for 1.3??


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to