I committed a change a while ago that adds import junit.framework.Assert; at the top and replaced the TestCase.fail(...)s with Assert.fail(...)s. I'm way too Java-impaired to know if my patch achieves anything like your suggestion but, if not, I'll try to hack your stuff in. BTW, I've discovered, so far, about 50 hyper-pedantic-gcj "problems" in frysk. I've committed patches for some of them and am working on the rest. Some are /real/ brain-dead, like "if (1 == 0) throw ....;" to fix a problem where something was supposed to throw an exceeption but didn't have any code to do so. Unused parameters and redundant casts make up most of the problems. Chris Andrew Cagney wrote: > This is an example of ecj being just a bit to single minded about how > the code should be written. If the code is changed to use > junit.Assert.assert* instead of frysk.junit.TestCase then we miss the > opportunity change the behavior. In fact, I'd like to suggest > modifying frysk.junit.TestCase along these lines: > > public static void assertNull (String what, Object o) > { > Assert.assertNull(what,o); > logger.log(Level.FINE, "assertNull {0} {1}\n", new Object[] > {what, null}); > } > public static void assertNull(Object o) > { > fail("called nameless assert method"); > } > > the second would obviously take some cleanning up before it passed :-) > > Andrew > > > Chris Moller wrote: >> Hello, Fryskers, wherever you are! >> >> Per the attached exchange between Andrew and me, does anyone have any >> idea how to fix this kind of bug? I'm not a Java guy and haven't a >> clue, and the suggestions I got from Phil on IRC regarding similar uses >> of TestCase.fail() in frysk weren't similar enough to the uses in >> AttachedSelf.java that I could apply them. >> >> Any advice/suggestions/sympathy would be greatly appreciated, >> Chris >> >> -------- Original Message -------- >> >> Chris, >> >> It's the new more pedantic ECJ; Mark's mentioned this on irc and >> frysk@. I'd send it to frysk@ asking for suggestions :-) >> >> Andrew >> >> >>> Hey, Andrew, >>> >>> The following bug just popped up on some code you added on Friday. >>> It's >>> coming from a rawhide machine, so I don't know if it's a real bug or a >>> gcj/ecj gotcha. Anyway, FWIW: >>> >>> /home/moller/tinkering/frysk/04-16/build/frysk-imports/../../frysk/frysk-imports/frysk/testbed/AttachedSelf.java:66: >>> >>> error: The static method fail(String) from the type Assert should be >>> accessed directly >>> TestCase.fail (why); >>> ^^^^^^^^^^^^^^^^^^^ >>> /home/moller/tinkering/frysk/04-16/build/frysk-imports/../../frysk/frysk-imports/frysk/testbed/AttachedSelf.java:77: >>> >>> error: The static method fail(String) from the type Assert should be >>> accessed directly >>> TestCase.fail ("unexpected signal " + sig); >>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> 2 problems (2 errors) >>> make[3]: *** [frysk/sys/TestPtraceServer.o] Error 1 >>> >>> >>> >>> >>> >> >> >> >> >