Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files
[FIXED JENKINS-25511] [JENKINS-17309] Reverted XML escaping of message.
Revert of fix for JENKINS-17309. Previous solution was too aggressive, it makes sense to escape only messages from parsers that parse non-XML files. XML parsers should not escape entities at all.
AbstractAnnotation never escapes entities now, only GCC parser escapes and invokes constructor with escaped message.
  • Loading branch information
uhafner committed Nov 16, 2014
1 parent 15d6527 commit 067654f75120c548ba24ddf20b574e00e1c5056b
Showing with 6 additions and 8 deletions.
  1. +1 −1 checkstyle.iml
  2. +1 −1 pom.xml
  3. +4 −6 src/test/java/hudson/plugins/checkstyle/parser/
@@ -20,7 +20,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.jvnet.hudson.plugins:analysis-core:1.65" level="project" />
<orderEntry type="module" module-name="analysis-core" />
<orderEntry type="library" name="Maven: de.java2html:java2html:5.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.3.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-digester3:3.2" level="project" />
@@ -34,7 +34,7 @@
@@ -7,7 +7,6 @@
import java.util.Iterator;

import org.apache.commons.lang.StringEscapeUtils;
import org.junit.Test;

import static org.junit.Assert.*;
@@ -38,12 +37,11 @@ public void issue25511() throws InvocationTargetException {
Iterator<FileAnnotation> iterator = annotations.iterator();

FileAnnotation annotation =;
assertEquals("Wrong message text", annotation.getMessage(),
"&apos;,&apos; is not followed by whitespace.");
assertEquals("Wrong message text", "',' is not followed by whitespace.",

annotation =;
assertEquals("Wrong message text", annotation.getMessage(),
"Type hint &quot;kEvent&quot; missing for $event at position 1");
assertEquals("Wrong message text", "Type hint \"kEvent\" missing for $event at position 1", annotation.getMessage());

@@ -113,7 +111,7 @@ public void analyseCheckStyleFile() throws InvocationTargetException {
"Checks that classes are designed for extension."));
"Wrong message detected.",
StringEscapeUtils.escapeXml("Die Methode 'detectPackageName' ist nicht fr Vererbung entworfen - muss abstract, final oder leer sein."),
"Die Methode 'detectPackageName' ist nicht fr Vererbung entworfen - muss abstract, final oder leer sein.",
hasChecked = true;

0 comments on commit 067654f

Please sign in to comment.