Hi, On 16 oct. 2013, at 08:27, Bengt Rodehav <[email protected]> wrote:
> I have code like this: > > @Requires(optional = false, nullable = false) > private INotificationProvider[] mProviders; > > My intention was to require at least one provider. If I drop the "nullable > = false" then the error logging goes away but will it still require at > least one provider? > > If I set "optional = true", does that mean that an empty array will be OK? > Will the array be null or empty? For aggregate optional dependencies, iPOJO injects empty arrays. If you remove the optionality, iPOJO injects an array with at least one provider. Regards, Clement > > /Bengt > > > > 2013/10/15 Bengt Rodehav <[email protected]> > >> Ok - thanks. /Bengt >> Den 15 okt 2013 13:24 skrev "Clement Escoffier" < >> [email protected]>: >> >> Hi, >>> >>> On 15 oct. 2013, at 13:05, Bengt Rodehav <[email protected]> wrote: >>> >>>> I am trying to update iPOJO frm 1.8.6 to the newly released 1.11.0. >>>> However, I get the following error message in my log: >>>> >>>> 2013-10-15 13:01:12,874 | ERROR | pool-1-thread-1 | >>> notification-service >>>> | ? ? | [ERROR] >>>> seco.notification.service : The `nullable`, `default-implementation` and >>>> `exception` attributes are not usable in >>>> {id=se.digia.seco.notification.spi.INotificationProvider, >>> field=mProviders, >>>> specification=se.digia.seco.notification.spi.INotificationProvider} - >>>> reason: the dependency is aggregate >>>> 2013-10-15 13:01:12,946 | ERROR | pool-1-thread-1 | web-console >>>> | ? ? | [ERROR] >>>> seco.webconsole : The `nullable`, `default-implementation` and >>> `exception` >>>> attributes are not usable in {id=se.digia.seco.web.api.IPlugin, >>>> field=mPlugins, specification=se.digia.seco.web.api.IPlugin} - reason: >>> the >>>> dependency is aggregate >>>> >>>> Are there any incompatible changes between these iPOJO versions that I >>> need >>>> to address? >>> >>> It's not really an incompatibility, we just catch more errors. Your >>> dependency has a `nullable` `default-implementation` or `exception` >>> specified in its configuration while being aggregate. In the previous >>> version, these parameters were silently ignored, in the 1.11.0 we raise an >>> exception. Just remove the wrong parameters. >>> >>> Regards, >>> >>> Clement >>> >>>> >>>> /Bengt >>> >>> >>> --------------------------------------------------------------------- >>> 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]

