Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1546

Resolve path to clover.jar when packed as OSGI bundle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 4.0.1
    • None
    • Ant Tasks
    • None

    Description

      ClassPathUtil.getCloverJarPath() searches for a JAR in case when URL returned by class loader is like:

      jar:file:!/path/to/clover.jar/com/atlassian/clover/util/ClassPathUtil.class
      

      or

      file:/path/to/classes/directory/com/atlassian/clover/util/ClassPathUtil.class
      

      However, it does not handle a case for OSGI bundles, which have an URI like:

      bundle://28.0:2/com/atlassian/clover/util/ClassPathUtil.class
      

      Fix: use getClass().getProtectionDomain().getCodeSource().getLocation().toURI()

      Attachments

        Activity

          People

            mparfianowicz Marek Parfianowicz
            mparfianowicz Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: