Gang (I guess Rickard is a gang),

I get the feeling that the entire Visibility system is no longer
working, and wonder how you can manage to get a layered app working,
unless you expose everything Visibility.application.

I modified one of the Visibility related tests to use Entity instead
of Service, and sure the Visibility problem that I experience also
manifested itself. Debugging around, I have found a big anomaly that I
can't explain;

In LayerInstance;
public boolean visitModules( ModuleVisitor visitor, Visibility visibility )
{
    // Visit modules in this layer
    for( ModuleInstance moduleInstance : moduleInstances )
    {
        if( !visitor.visitModule( moduleInstance,
moduleInstance.model(), visibility ) )
        {
            return false;
        }
    }

The if() statement evaluates to TRUE, and the method returns false,
which seems to be the problem. BUT, the visitor instance in question
is the EntityFinder, with the following code;

public boolean visitModule( final ModuleInstance moduleInstance,
ModuleModel moduleModel, final Visibility visibility )
{
    moduleModel.entities().visitModel( new ModelVisitor()
    {
        @Override
        public void visit( EntityModel entityModel )
        {
            if( EntityComposite.class.isAssignableFrom( mixinType ) )
            {
                if( mixinType.equals( entityModel.type() ) &&
entityModel.visibility() == visibility )
                {
                    modules.add( moduleInstance );
                    models.add( entityModel );
                }
            }
            else
            {
                if( mixinType.isAssignableFrom( entityModel.type() )
&& entityModel.visibility() == visibility )
                {
                    modules.add( moduleInstance );
                    models.add( entityModel );
                }
            }
        }
    } );
    return true;
}

Low and behold, I have verified with debugging that "return true" is
reached. So, how on earth can;

if( ! true )

evaluate to true ??


Beats me...


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