|
|
|
Corrected a bug in the test case. Actually the line I mentioned should be
assertEquals(foo.join("\n") + "\n", writer.toString()) This is corrected in the attached file. Ah, this seems to be the same issue that made the mailing list today. println method is not actually defined in Writer, so the println that is added to Object class by Groovy is invoked.
I would propose that the added method Object.println be made protected thus making examples like the one I gave fail due to trying to access a method where it is not visible. This one is still around, DGM does not have a Writer.println version so any calls route to Object.println, effectively printing to stdout instead.
Push it to 1.2? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
assertEquals(foo.join(""), writer.toString())
should be:
assertEquals(foo.join("\n"), writer.toString())
This does not change this being a bug, though. = )