Minor tweaks to the Cobertura integration
-----------------------------------------
Key: OFBIZ-3651
URL: https://issues.apache.org/jira/browse/OFBIZ-3651
Project: OFBiz
Issue Type: Bug
Components: framework
Affects Versions: SVN trunk
Reporter: Bob Morley
Fix For: SVN trunk
Attachments: OFBIZ-3651_CoberturaMinorEnhancements.patch
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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.