Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-3651

Minor tweaks to the Cobertura integration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • Trunk
    • framework
    • None

    Description

      When enabling Cobertura I ran into a few things that seemed like candidates for changing. They were:

      1) When starting up tests w/o Cobertura (which is our standard) two stack traces would be dumped because the Class could not be found in the classpath. This is standard execution so I felt it was better if we put out a single message to the system console indicating that instrumentation had been disabled. Message is: InstrumenterWorker.instrument - Code instrumentation has been disabled, unable to find instrumenter class " + instrumenterClassName.

      2) We know up front if the main configuration / container has been configured to not have an instrumentation so I do a check up front rather than have it go down into the implementation. This is consistent with how other things are set in Start.java.

      3) Current code base is not compatible with the latest version of Cobertura. They have removed the static method ProjectData.getGlobalProjectData(). We would actually only ever need this if the instrumenter was not opened before trying to instrument a class (this is Cobertura implementation specific). I wrapped the instrumenting in a check similar to the close method. If you grab Cobertura 1.9.4 you can see this compile error.

      Intent is to discuss with Ofbiz experts in this area to make sure these are the right things to do.

      Attachments

        Activity

          People

            erwan Erwan de Ferrieres
            bmorley Bob Morley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: