Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Guava 15/21 warning

Hi Ed,

> Please read the
> Bugzillas.

Reading through Bug 427862 comment 8 ff. [1], it seems like OSGi's uses
constraints would solve your problem.

> The problem never occurs for individual projects. It only occurs when an
> integrating project 'inherits' conflicting Guava loads from two distinct
> component projects with Guava in the APIs.
> So Mylyn only is no problem, but something that integrates Mylyn and
> Xtext can encounter obscure failures when the wrong class is re-used on
> a code path in which both are used.
I had a *brief* look at the Papyrus (RT) code and I think I know why you
continue to have problems with Guava:

1.) A bundle like org.eclipse.papyrusrt.umlrt.core requires, but only provides a lower version bound [2]:

> Require-Bundle:;bundle-version="11.0.0"

This is dangerous, as Guava may change API in incompatible ways between
major versions (and has done so in the past).

2.) Your bundles export packages [3] whose classes have Guava classes in
their public API [4]:

> Export-Package: org.eclipse.papyrus.infra.core.resource

> Optional<Boolean> isReadOnly(...)

The above package should clearly have a uses constraints:

> Export-Package:

Have a look at this article [5] that nicely explains "What is a Uses
Constraint Anyway".

Hope this helps,


[1] <>
[5] <>

Codetrails GmbH
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Phone: +49-6151-276-7092
Mobile: +49-170-811-3791

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940

Attachment: signature.asc
Description: OpenPGP digital signature

Back to the top