Does seem like that should be the case.
Just  considering contributions to services in TapestryModule, you would have 
to have @Core + any other markers to any contribution that you wanted to make 
by Marker.  containsAll seems like a more sensible alternative, although I'm 
still thinking about whether there would be any unintended consequences from 
containsAll.

Robert

On Jul 6, 2010, at 7/65:20 PM , Howard Lewis Ship wrote:

> I'm looking over this code right now, from ModuleImpl:
> 
>    public Set<ContributionDef2>
> getContributorDefsForService(ServiceDef serviceDef)
>    {
>        Set<ContributionDef2> result = CollectionFactory.newSet();
> 
>        for (ContributionDef next : moduleDef.getContributionDefs())
>        {
>            ContributionDef2 def = InternalUtils.toContributionDef2(next);
> 
>            if (serviceDef.getServiceId().equals(def.getServiceId()))
>            {
>                result.add(def);
>            }
>            else
>            {
>                Set<Class> markers = 
> CollectionFactory.newSet(def.getMarkers());
> 
>                if (markers.contains(Local.class))
>                {
>                    if
> (moduleDef.getServiceDef(serviceDef.getServiceId()) == null)
>                        continue;
> 
>                    markers.remove(Local.class);
>                }
> 
>                if (serviceDef.getMarkers().equals(markers)    // Why equals() 
> ?
>                        && serviceDef.getServiceInterface() ==
> def.getServiceInterface())
>                {
>                    result.add(def);
>                }
>            }
>        }
> 
>        return result;
>    }
> 
> 
> I think that's an error, comparing the services markers to the
> contribution methods markers using equals().  I believe that should be
> containsAll().  As in, the contribution method's annotations are a
> super-set of the service's marker annotations.
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to