Hi

Sorry for spamming the list the last couple of days. After having watched the 
mailing list for a couple of years, I am now trying to actually understand what 
is going on in this cool project.

I have been playing around with the MapOverrideTest (which uses a 
java.util.HashMap as a mixin).
After having fixed a few issues (with classloaders and opcodes)  I now run into 
this issue:

    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        module.values( Map.class ).withMixins( HashMap.class ).withConcerns( 
ReadOnlyMapConcern.class );
    }


    @Test //@Ignore("Until we can override JDK classes in FragmentClassLoader" )
    public void givenReadOnlyAnnotatedHashMapWhenCallingSizeExpectSuccess()
    {
        ValueBuilder<Map> builder = module.newValueBuilder( Map.class );
        Map<String,String> prototype = builder.prototype();
        prototype.put( "Niclas", "Hedhman" );  // a readonly concern throws an 
exception here ??   <-----------------------------------------------------
        Map<String,String> underTest =  builder.newInstance();
        assertThat( underTest.get( "Niclas" ), equalTo("Hedhman") );
    }


Is it expected that concerns are applied on prototypes (for a value composite)? 

/Kent


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

Reply via email to