Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-dev] canonical way to handle optional dependencies

I think there is no "one fits all". Optional dependency are really problematic to handle right and should be avoided as they often mean your bundle/services are not well shaped.

If you describe your case it might be possible to give some more advice.

Am 15.04.21 um 13:38 schrieb Jonah Graham:
Hello,

(Not sure this is on topic for the list - but not sure where to ask.)

What is the canonical way to check if an optional dependency is available?

I know of a couple of methods:

1. wrapping code in try/catch and catching something wide like Throwable or NoClassDefFoundError 2. checking for bundle status (e.g. calling Platform.getBundle(symbolicName) and Bundle.getState)

Thank you.
Jonah




~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com <http://www.kichwacoders.com>

_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev



Back to the top