bndtools/bnd — pull request #606 by seanbright (2014-08-20 19:21:37+00:00)
Title: Use consistent EOLs when creating DS & Metatype resources

MetaTypeReader and TagResource both use PrintWriter.println() to output the XML declaration and then delegate to Tag.print() to generate the XML document. Tag.print() uses PrintWriter.print("\n") to generate newlines in the XML document.

PrintWriter.println() on Windows will use \r\n, so we end up with inconsistent whitespace in the file. This patch changes Tag.print() to invoke PrintWriter.println() instead of hard coding the EOL character. This is only a presentation issue, but it also "resolves" this bndtools issue (assuming you are looking at a JAR created on your platform):

https://github.com/bndtools/bndtools/issues/864

An alternate approach would be to change MetaTypeReader and TagResource to explicitly use a \n when rendering the XML declaration rather than using PrintWriter.println().