Some DS components are busted
Created by: jayjaybillings
Some of our DS components are busted and will post errors similar to the following:
!ENTRY org.eclipse.ice.nek5000 4 0 2017-02-15 09:26:53.568
!MESSAGE [org.eclipse.ice.nek5000.VizServiceFactoryHolder(104)] doFindMethod: Suitable but non-accessible method found in class org.eclipse.ice.nek5000.internal.VizServiceFactoryHolder
!ENTRY org.eclipse.ice.nek5000 4 0 2017-02-15 09:26:53.568
!MESSAGE [org.eclipse.ice.nek5000.VizServiceFactoryHolder(104)] findMethod: Suitable but non-accessible method setVizServiceFactory found in class org.eclipse.ice.nek5000.internal.VizServiceFactoryHolder, subclass of org.eclipse.ice.nek5000.internal.VizServiceFactoryHolder
!ENTRY org.eclipse.ice.nek5000 4 0 2017-02-15 09:26:53.568
!MESSAGE [org.eclipse.ice.nek5000.VizServiceFactoryHolder(104)] bind method [setVizServiceFactory] not found; Component will fail
!ENTRY org.eclipse.ice.nek5000 4 0 2017-02-15 09:26:53.569
!MESSAGE [org.eclipse.ice.nek5000.VizServiceFactoryHolder(104)] bind method [setVizServiceFactory] not found
This problem is caused by updates to bndtools that were included in Apache Felix which has in turn been picked up by Equinox, c.f. - https://github.com/bndtools/bnd/issues/486. The source of the error in ICE (and EAVP) is that we are using static setters to store services. Fixing this is as simple as removing the static access modifier and replacing any instances of something like
MyServiceHolder.set(foo);
with
MyServiceHolder holder = new MyServiceHolder();
holder.set(foo);
These are, in fact, very good changes for us to make because creating our own singletons to store services has always been one of our sources of technical debt. In this case, all of ICE's various fields for storing such services are static because of our inheritance model, but access to them should not be.