| Summary: | [R5] No way to tell if VersionRange has no upper limit | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Tim deBoer <deboer> |
| Component: | Framework | Assignee: | equinox.framework-inbox <equinox.framework-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | aniefer, tjwatson |
| Version: | 3.6 | ||
| Target Milestone: | Juno M5 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 354191 | ||
|
Description
Tim deBoer
Consider in 3.7. Too late for 3.6. As a workaround, the way to tell would be something like this: Version testVersion = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE); range.isIncluded(testVersion); or some variation of looking at range.getMaximum() to see if it has Integer.MAX_VALUE Yup, that's essentially what I'm doing - just thought it would be cleaner if there was something built in. Thanks for the quick response, 3.7 is fine. Move all 3.8 bugs to Juno. In OSGi R4.4 OSGi is going to provide a VersionRange class. This new class should provide us a way to do this. In bug 366419 I released a fix to rebase the Equinox VersionRange class on top of the new OSGi VersionRange class. The method org.eclipse.osgi.service.resolver.VersionRange.getMaximum() has been deprecated. Use the method org.osgi.framework.VersionRange.getRight() instead. This method will return a null value when the right endpoint (maximum version) is infinity. |