Use a private static final instead of an ivar.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1147501 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2011-07-16 22:31:35 +00:00
parent 12f8a472c0
commit fe645ed552
1 changed files with 9 additions and 9 deletions

View File

@ -201,7 +201,7 @@ public void testEscapeEcmaScript() {
// HTML and XML
//--------------------------------------------------------------
String[][] htmlEscapes = {
private static final String[][] HTML_ESCAPES = {
{"no escaping", "plain text", "plain text"},
{"no escaping", "plain text", "plain text"},
{"empty string", "", ""},
@ -217,10 +217,10 @@ public void testEscapeEcmaScript() {
@Test
public void testEscapeHtml() {
for (int i = 0; i < htmlEscapes.length; ++i) {
String message = htmlEscapes[i][0];
String expected = htmlEscapes[i][1];
String original = htmlEscapes[i][2];
for (int i = 0; i < HTML_ESCAPES.length; ++i) {
String message = HTML_ESCAPES[i][0];
String expected = HTML_ESCAPES[i][1];
String original = HTML_ESCAPES[i][2];
assertEquals(message, expected, StringEscapeUtils.escapeHtml4(original));
StringWriter sw = new StringWriter();
try {
@ -234,10 +234,10 @@ public void testEscapeHtml() {
@Test
public void testUnescapeHtml4() {
for (int i = 0; i < htmlEscapes.length; ++i) {
String message = htmlEscapes[i][0];
String expected = htmlEscapes[i][2];
String original = htmlEscapes[i][1];
for (int i = 0; i < HTML_ESCAPES.length; ++i) {
String message = HTML_ESCAPES[i][0];
String expected = HTML_ESCAPES[i][2];
String original = HTML_ESCAPES[i][1];
assertEquals(message, expected, StringEscapeUtils.unescapeHtml4(original));
StringWriter sw = new StringWriter();