Uploaded image for project: 'CXF Distributed OSGi (Retired)'
  1. CXF Distributed OSGi (Retired)
  2. DOSGI-162

Compilation errors when using OSGi core 4.3.0/4.3.1/5.0.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4.0
    • 1.5.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.

      Attachments

        1. fix_osgi_compilation_errors.diff
          31 kB
          Amichai Rothman

        Activity

          People

            cschneider Christian Schneider
            amichai Amichai Rothman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: