Community
Participate
Working Groups
The interface IHost should be declared directly to implement IAdaptable. The implementation itself (org.eclipse.rse.internal.model.Host) is implementing the adaptable feature anyway. It would avoid to checking all the time again if IHost instances are adaptable or not ... ... public void blabla(IHost host) { ... if (host instanceof IAdaptable) { XYZ xyz = (XYZ)((IAdaptable)host).getAdapter(XYZ.class); ... } ... } ... would read then ... public void blabla(IHost host) { ... XYZ xyz = (XYZ)host.getAdapter(XYZ.class); ... } ...
Created attachment 56964 [details] Trival 5 line patch to address the issue
Sounds ok for me. Dave?
I see no problems with this. I will implement.
Patch applied. This is nominally an API change since it slightly alters the definition of IHost, so the [api] tag was added to the summary. No new methods or constants are defined as a result so the change is probably binary compatible.
Closing [api] bugs that have apparently been fixed in the code.
[target cleanup] 2.0 M5 was the original target milestone for this bug