forked from phoedos/pmd
Merge branch 'bug-1499' into pmd/5.4.x
This commit is contained in:
@ -77,7 +77,7 @@ public final class XMLRenderer implements Renderer {
|
||||
transformer.setOutputProperty(OutputKeys.CDATA_SECTION_ELEMENTS, "codefragment");
|
||||
StringWriter writer = new StringWriter();
|
||||
transformer.transform(new DOMSource(doc), new StreamResult(writer));
|
||||
return writer.getBuffer().toString();
|
||||
return writer.toString();
|
||||
} catch (TransformerException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ import org.junit.contrib.java.lang.system.RestoreSystemProperties;
|
||||
import org.junit.contrib.java.lang.system.StandardOutputStreamLog;
|
||||
import org.junit.rules.TestRule;
|
||||
|
||||
import net.sourceforge.pmd.PMD;
|
||||
|
||||
public class CPDCommandLineInterfaceTest {
|
||||
@Rule
|
||||
public final TestRule restoreSystemProperties = new RestoreSystemProperties();
|
||||
@ -27,7 +29,6 @@ public class CPDCommandLineInterfaceTest {
|
||||
"--files", "src/test/resources/net/sourceforge/pmd/cpd/files/",
|
||||
"--format", "xml"
|
||||
});
|
||||
Assert.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<pmd-cpd/>\n", log.getLog());
|
||||
Assert.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "\n" + "<pmd-cpd/>" + PMD.EOL, log.getLog());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -14,4 +14,7 @@
|
||||
|
||||
**Bugfixes:**
|
||||
|
||||
* General
|
||||
* [#1499](https://sourceforge.net/p/pmd/bugs/1499/): \[core] CPD test break PMD 5.5.1 build on Windows
|
||||
|
||||
**API Changes:**
|
||||
|
Reference in New Issue
Block a user