Another thing; Activatable starts showing up in new places, for a different purpose. That is probably quite unfortunate if we are going to try and remove it from client code later.
Cheers Niclas On Sat, Jul 14, 2012 at 4:01 PM, Niclas Hedhman <[email protected]> wrote: > There are some substantial changes around isActive() and > isAvailable(), and one case in particular I wonder if you have gotten > everything right; > > For instance; ImportedServiceReferenceInstance > > public boolean isAvailable() > { > - try > - { > - getInstance(); > - return serviceInstance.isAvailable(); > - } > - catch( ServiceImporterException e ) > - { > - LoggerFactory.getLogger( getClass() ).warn( "Imported > service throwed an exception on isAvailable(), will return false.", e > ); > - return false; > - } > + return serviceInstance != null && serviceInstance.isAvailable(); > > The previous code would activate the service before checking if it is > available. The replaced code looks like it ignores the effect of lazy > activation. > > > Cheers > -- > Niclas Hedhman, Software Developer > http://www.qi4j.org - New Energy for Java > > I live here; http://tinyurl.com/3xugrbk > I work here; http://tinyurl.com/6a2pl4j > I relax here; http://tinyurl.com/2cgsug -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/3xugrbk I work here; http://tinyurl.com/6a2pl4j I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

