Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-682

Package.getImplementationVersion returns null for package loaded by Felix

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • framework-1.0.4
    • framework-1.2.0
    • Framework
    • None
    • NA

    Description

      Even though MANIFEST.MF has proper entry for Implementation-Version, Package.getImplementationVersion() returns null. A reproducible test case is attached. It is described below:

      public class Foo implements BundleActivator {
      public void start(BundleContext context) throws Exception

      { Package p = getClass().getPackage(); System.out.println(p); System.out.println(p.getImplementationVersion()); }

      }

      The headers for this bundle are:
      osgi-test1 (10)
      ---------------
      Tool = Bnd-0.0.255
      Bundle-Activator = sahoo.osgitest1.Foo
      Implementation-Version = 1.0-SNAPSHOT
      Implementation-Vendor-Id = sahoo
      Bundle-Version = 1.0.0.SNAPSHOT
      Build-Jdk = 1.5.0_13-rev
      Implementation-Title = osgi-test1
      Created-By = Apache Maven Bundle Plugin
      Bundle-ManifestVersion = 2
      Manifest-Version = 1.0
      Bnd-LastModified = 1218821794953
      Private-Package = sahoo.osgitest1
      Bundle-Name = osgi-test1
      Built-By = ss141213
      Import-Package = org.osgi.framework;version="1.3"
      Bundle-SymbolicName = sahoo.osgi-test1

      Attachments

        1. Felix-682.zip
          2 kB
          Sanjeeb Kumar Sahoo
        2. java-pkg-versioning-spec-bug.zip
          6 kB
          Sanjeeb Kumar Sahoo

        Issue Links

          Activity

            People

              rickhall Richard S. Hall
              sahoo Sanjeeb Kumar Sahoo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: