updates to resolve issue #801

This commit is contained in:
Jeremy Long
2017-07-16 13:15:23 -04:00
parent 4ec8e3bbbb
commit 2ab92a940b
3 changed files with 4 additions and 3 deletions

View File

@@ -159,7 +159,8 @@ public class XmlInputStream extends FilterInputStream {
// Keep it.
pushBack.append(code);
} else {
throw new IOException("Invalid/Unknown reference '&" + reference + ";'");
// invalid entity. Encode the & and append the sequence of chars.
pushBack.append("&").append(reference).append((char) ch);
}
} else {
// Did not terminate properly!

View File

@@ -49,7 +49,7 @@ public class PomUtilsTest extends BaseTest {
assertEquals(expResult, result.getOrganizationUrl());
file = BaseTest.getResourceAsFile(this, "jmockit-1.26.pom");
expResult = "Main ø modified to test issue #710";
expResult = "Main ø modified to test issue #710 and #801 (&amps;)";
result = PomUtils.readPom(file);
assertEquals(expResult, result.getName());
}

View File

@@ -7,7 +7,7 @@
<groupId>org.jmockit</groupId><artifactId>jmockit</artifactId><version>1.26</version>
<packaging>jar</packaging>
<name>Main &oslash; modified to test issue #710</name>
<name>Main &oslash; modified to test issue #710 and #801 (&amps;)</name>
<description>
JMockit is a Java toolkit for automated developer testing.
It contains mocking and faking APIs and a code coverage tool, supporting both JUnit and TestNG.