This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
private static String cleanupContent(String template) {
BufferedReader r = new BufferedReader(new StringReader(template));
try {
PrintWriter w = new PrintWriter(new StringWriter(template.length()));
StringWriter sw = new StringWriter(template.length());
PrintWriter w = new PrintWriter(sw);
while (true) {
String line = r.readLine();
}
w.flush();
return w.toString().trim();
return sw.toString().trim();
} finally {
r.close();