Resolve path to clover.jar when packed as OSGI bundle

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 4.0.1
    • Affects Version/s: None
    • Component/s: Ant Tasks
    • None

      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()

              Assignee:
              Marek Parfianowicz (Inactive)
              Reporter:
              Marek Parfianowicz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: