| Summary: | Ensure compatibility to Guava 18 and 21. | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Alexander Nyßen <nyssen> |
| Component: | Misc | Assignee: | Alexander Nyßen <nyssen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 1.0.0 | ||
| Target Milestone: | 5.0.0 (Oxygen) M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Alexander Nyßen
The only compatibility problem we have is that TypeToken.isAssignableFrom() has been deprecated in 19 and removed in 20. The replacement TypeToken.isSupertypeOf() has been introduced with 19. We can either stick to TypeToken.isAssignable and enable [15.0.0, 19.0.0) as range, or we can switch to TypeToken.isSuperTypeOf() and enable [19.0.0, 22.0.0). If we want to support the full range, i.e. [15.0.0, 22.0.0), we will have to provide an internal workaround that works with reflection. As the Oxygen release is intended to be backwards compatible to Luna (where Guava 19 was not yet provided in Orbit), we should probably not drop support for it now. I provided a utility method within our Types class, which uses reflection to delegate to TypeToken.isAssignableFrom(TypeToken) or TypeToken.isSuperTypeOf(TypeToken), whatever is available. I widened out version constraints to comply with all Guava versions between 12 and 21. I created PB CQs for 19 and 21, so usage is approved. Resolving as fixed in 5.0.0 M7. |