From: Peter R. <pet...@gm...> - 2012-02-20 14:55:44
|
Actually, a question would be why there there is a complexity number in cobertura at all. A coverage tool should just do coverage.. Peter On Mon, Feb 20, 2012 at 1:01 PM, Martin Kutter <mar...@fe...> wrote: > Hi, > > I've been experiencing an error with UTF-8 characters while scanning a > project with cobertura. > > From what I found, it looks like the error occurs in Javancss, and is due > to the encoding parameter not being passed on to javancss from cobertura. > > The error can be easily replicated by scanning a project containing a > class with a statement like this: > > char umlautChar = 'ä'; > > There's already a bunch of bug reports on this issue, and there are two > patches (one in Issue 2907314, and one as patch 3152767): > > Issues: > https://sourceforge.net/tracker/index.php?func=detail&aid=3049863&group_id=130558&atid=720015 > https://sourceforge.net/tracker/index.php?func=detail&aid=3020621&group_id=130558&atid=720015 > https://sourceforge.net/tracker/index.php?func=detail&aid=2907314&group_id=130558&atid=720015 > > Patch: > https://sourceforge.net/tracker/?func=detail&aid=3152767&group_id=130558&atid=720017 > (the patch is garbled by inconsistent line endings, though). > > I've applied tested the patch from Issue 2907314 locally, and it seems to > work fine. > > The patch adds a encoding parameter to the constructor added by cobertura > to Javancss, and adds encoding handling to the FileFinder. > > The implementation could be simplified by using Javancss' own > Javancss(Reader reader) constructor - this would require > ComplexityCalculator to > create a InputStreamReader on the source in question and pass it on to > Javancss. This would remove the need for introducing a new constructur in > Javancss - however, the Javancss(Reader reader) constructor does not > provide any useful error handling (it just catches Exception without any > further error handling or notification), so this might be a regression. > > Is there anything I can do to get the fix incorporated? > If there's help needed, I can work with the SF SVN and tracker - my SF > username is kutterma > > Best regards, > > Martin > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel |