From: Martha Y. <my...@us...> - 2005-04-07 14:33:54
|
Hi Mark, I'll try reproducing the the finally error but in case I'm not sucessful=20 are there any traces that I can take with my current code (Grzegorz=20 indicated the debug option in log4j properties file but I don't see much=20 recorded when I run test). I've noticed the end bracket being counted as zero in almost every=20 synchronized block that I've seen and almost all of them are not at the=20 end of a method. I think there is a problem with that particular key=20 word/block Thanks Martha Yanez (919) 224-1320 / 8-687-1320 New Notes id: Martha Yanez/Raleigh/IBM my...@us... "Mark Doliner" <Mar...@sa...>=20 Sent by: cob...@li... 04/07/2005 09:27 AM To Martha Yanez/Raleigh/IBM@IBMUS, <cob...@li...> cc Subject RE: [Cobertura-devel] Report Question > Hello all=20 > I've gotten reports to run (many thanks to Grzegorz) and am slowly=20 starting to analyze some results most of which look accurate.=20 > However I'm seeing some odd items like the following:=20 >=20 > 353 finally=20 > 354 {=20 > 355 0 if (allOK)=20 > 356 { // Life is WONDERFUL!!! Issue MEM started=20 message=20 > 357 3 status =3D Status.STATUS=5FRUNNING;=20 > 358=20 xLogger.message(IRecordType.TYPE=5FINFO,CLASSNAME,methodName,"DYKME9016I");= =20 > 359 }=20 > 360 else=20 > 361 {=20 > 362 0 status =3D Status.STATUS=5FFAILED; // very = important to set=20 >=20 > Line 355 is highlited in pink and show zero coverage yet it was=20 definitely executed as indicated by line 357 and the appearence of the=20 message=20 > on my console.=20 That definitely shouldn't be happening... If you're able to reproduce=20 this in a small, hello world-like program then it would be great if you=20 could file a bug report about it. > Another one is:=20 > 246 3 synchronized(this)=20 > 247 {=20 > 248 3 if (status =3D=3D STATUS=5FSTARTING)=20 > 249 {=20 > 250 3 status =3D STATUS=5FSTEADY=5FSTATE;=20 > 251 3 threadSuspended =3D false;=20 > 252 3 notify();=20 > 253 }=20 > 254 0 }=20 >=20 > Line 254 which is simply the closing bracket of a block that has been=20 executed is showing a zero count.=20 For this one, line 254 should probably not be considered a line of code.=20 Is this block at the end of a method? At the end of methods that return=20 void, I belive a "return" instruction is added in the bytecode, even if=20 one is not explictly stated in the code. Maybe Cobertura is looking at=20 line 254 as this implicit return instruction? -Mark ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad=5Fide95&alloc=5Fid=14396&op=3Dclick =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |