From: Mark D. <Mar...@sa...> - 2005-03-22 21:48:57
|
For the record, the reason I don't like requiring ourselves to be = compatible with 1.3 or older is because there ARE advantages to using = newer JDKs (not having to include extra jars like Jakarta ORO, parts of = xerces, or extra classes, for example). =20 If everyone writes their Java applications to be compatible with 1.3 = then no one moves forward and we stay at the same place forever and no = one makes any progress. This is, of course, an exaggeration. (And it's = somewhat different for Cobertura, since we're a development tool and not = an end-user application.) =20 However, I like being a reason for people to stop catering to old JDKs. = I guess it's similar to the Web Standards Project = http://www.webstandards.org/upgrade/. =20 -Mark =20 =20 ________________________________ From: Jeremy Ryan Thomerson [mailto:je...@th...]=20 Sent: Tuesday, March 22, 2005 4:19 PM To: Woodward, John; Mark Doliner; cob...@li... Subject: Re: [Cobertura-devel] Using jdk 1.3? =09 =09 To everyone's knowledge is that String.replacecAll(...) our only = incompatibility with JDK less than 1.4? If so, I'll just commit the = StringUtil I had written originally so that we could avoid using = String.replaceAll(...) and we'd be backward compatible. I think that it = is something we really should do, at least back to 1.3, but I'd prefer = to see us work back to 1.2. I think we have a lot better chance of = increasing adoption by being compatible back to 1.2. =20 jeremy ----- Original Message -----=20 From: Woodward, John <mailto:Joh...@sa...> =20 To: Mark Doliner <mailto:Mar...@sa...> ; = cob...@li...=20 Sent: Tuesday, March 22, 2005 10:03 AM Subject: RE: [Cobertura-devel] Using jdk 1.3? I understand that completely. The situation here is a platform that = requires us to use 1.3 --- and they are relying on some 1.3 class = structures. For my purposes, the code coverage could be done completely = with 1.4 (ignoring the 1 compiler error we get), so ... I may end up = doing some fiddling with the jdk versions. =20 Let me see what I can do. =20 J =20 =20 -----Original Message----- From: Mark Doliner [mailto:Mar...@sa...]=20 Sent: Tuesday, March 22, 2005 10:01 AM To: Woodward, John; cob...@li... Subject: RE: [Cobertura-devel] Using jdk 1.3? =20 FYI line 186 is a call to String.replaceAll(), which is new in jdk1.4. =20 It might be possible to compile your classes with 1.3 (or use 1.4 and = specify a 1.3 source and target), instrument your classes using 1.4, run = your tests using 1.3, then generate the coverage reports using 1.4. It = seems like it would take some annoying fiddling with ant to get that to = work correctly. =20 The other option is to modify Cobertura to work with 1.3. That's not = something I'm against... I was just hoping we could avoid it. -Mark =20 =20 =09 ________________________________ From: cob...@li... = [mailto:cob...@li...] On Behalf Of = Woodward, John Sent: Tuesday, March 22, 2005 10:48 AM To: cob...@li... Subject: [Cobertura-devel] Using jdk 1.3? I have a project that requires jdk1.3. Is there any way to use = Cobertura with 1.3? When I do, I consistently get the following = exception: =20 java.lang.NoSuchMethodError at = org.apache.tools.ant.Project.executeTarget(Project.java:1246) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at = org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at = org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) --- Nested Exception --- java.lang.NoSuchMethodError at = net.sourceforge.cobertura.ant.CommonMatchingTask.getJava(CommonMatchingTa= sk.java:186) at = net.sourceforge.cobertura.ant.CommonMatchingTask.saveArgs(CommonMatchingT= ask.java:156) at = net.sourceforge.cobertura.ant.InstrumentTask.coverage(InstrumentTask.java= :101) at = net.sourceforge.cobertura.ant.InstrumentTask.execute(InstrumentTask.java:= 149) at = org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) at org.apache.tools.ant.Task.perform(Task.java:401) at org.apache.tools.ant.Target.execute(Target.java:338) at org.apache.tools.ant.Target.performTasks(Target.java:365) at = org.apache.tools.ant.Project.executeTarget(Project.java:1237) at = org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at = org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at = org.apache.tools.ant.launch.Launcher.main(Launcher.java:90) =20 Alternatively, with multiple jdk's installed, is there any way I can = specify a 1.3 compile for my source, and run Cobertura with 1.4 or 1.5? =20 Thanks! =20 John =20 |