Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.4.0
-
None
-
None
-
Oracle JDK 1.7.0_17
-
Unknown
Description
When trying to compile against the OSGi core library releases 4.3.0, 4.3.1 and 5.0.0, there are several compilation errors. The fix includes:
- cast null to String when calling BundleContext.getServiceReferences (an overloaded method was added, and passing null now causes ambiguity)
- fix generic types and use of Properties (which extend Hashtable<Object, Object>), by using Dictionary<String, String> implemented as Hashtable<String, String> instead.
- split between osgi.version and osgi.enterprise.version POM properties since the two have independent release versions (specifically, there are no enterprise 4.3.0/4.3.1 releases).
The fix is backward-compatible, so compilation is successful on 4.2.0/4.3.0/4.3.1/5.0.0 with the patch applied. However, there are still 4 unit tests which fail in the later versions, but these are unrelated to the compilation errors and have to do with other dependency library versions (the patch does not change any versions). So consider this the first step.