[
https://issues.apache.org/jira/browse/DOSGI-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13631792#comment-13631792
]
Amichai Rothman commented on DOSGI-162:
---------------------------------------
There's something strange here - I noticed the commit is missing a few changes
from the patch, such as the cast to String in
TopologyManagerExport.exportExistingServices(). This should not compile using
e.g. osgi core 4.3.1, due to the added overloaded method. If I change the osgi
version in parnet pom to 4.3.1, it still compiles (which is likely why it was
left out of the commit). However if I also change the felix version to 4.0.3,
then the compilation fails as expected.
I haven't looked much into it, but it seems like during the build the old osgi
classes are being taken from felix in precedence to the (newer) standalone osgi
ones. This is somewhat error-prone on its own and should probably be fixed, but
at the very least that cast should be committed :-)
> Compilation errors when using OSGi core 4.3.0/4.3.1/5.0.0
> ---------------------------------------------------------
>
> Key: DOSGI-162
> URL: https://issues.apache.org/jira/browse/DOSGI-162
> Project: CXF Distributed OSGi
> Issue Type: Bug
> Affects Versions: 1.4.0
> Environment: Oracle JDK 1.7.0_17
> Reporter: Amichai Rothman
> Assignee: Christian Schneider
> Priority: Minor
> Fix For: 1.5
>
> Attachments: fix_osgi_compilation_errors.diff
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira