You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jeremy Boynes <jb...@apache.org> on 2006/04/14 21:10:52 UTC

Warnings for Component since the generic was added for implementation

Seastien, in r393667 you added a generic to Component:

-public interface Component extends Extensible, AggregatePart {
+public interface Component<I extends Implementation> extends Part {

This is resulting in several warnings (e.g. in ComponentLoader) about
use of the raw class.

Is this generic really helpful? If so, please could you also clean up
the classes that use Component to get rid of the warnings.

Thanks
--
Jeremy

Re: Warnings for Component since the generic was added for implementation

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Jeremy Boynes wrote:
> Seastien, in r393667 you added a generic to Component:
>
> -public interface Component extends Extensible, AggregatePart {
> +public interface Component<I extends Implementation> extends Part {
>
> This is resulting in several warnings (e.g. in ComponentLoader) about
> use of the raw class.
>
> Is this generic really helpful? If so, please could you also clean up
> the classes that use Component to get rid of the warnings.
>
> Thanks
> --
> Jeremy
>
>   
The generic is useful, it allows T getImplementation() to return the 
correct "T extends Implementation", instead of having different 
get...Implementation() methods for AtomicComponent and ModuleComponent 
for example.

Thanks for reporting this. I suggest that we all use JIRA to report 
bugs. Tracking this kind of bug and resolution will be much easier with 
JIRA.

I created JIRA issue TUSCANY-196 to report what I'm seeing. I also put 
in the JIRA issue which Eclipse compiler option you need to turn on to 
get these warnings (was not on by default in my workspace). I think we 
should all have this option on to detect these warnings early. When I 
activated this compiler option I realized that we actually have a ton of 
these warnings in the runtime (not just with Component, but a number of 
other classes including ProxyFactory, ObjectFactory, AbstractLoader, 
FieldInjector, Injector, MethodEventInvoker etc. I'm probably missing 
some because the list was pretty big). If people want to start fixing 
the warnings in some of the sub-projects please create sub-tasks under 
TUSCANY-196.

Thanks.

-- 
Jean-Sebastien