Use the platform's line separator when generating code from templates. This

assumes that the depot.jar in question was created on a LF-only platform, but
that's probably a safe bet.
This commit is contained in:
Michael Bayne
2011-02-12 00:26:56 +00:00
parent d59717d025
commit 51aa221606
@@ -402,6 +402,7 @@ public class GenRecordTask extends Task
try {
String text = StreamUtil.toString(
getClass().getClassLoader().getResourceAsStream(tmpl), "UTF-8");
text = text.replace("\n", System.getProperty("line.separator"));
for (Map.Entry<String, String> entry : subs.entrySet()) {
text = text.replaceAll("@"+entry.getKey()+"@", entry.getValue());
}