Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[JENKINS-17309] Escape message texts that contain XML symbols.
  • Loading branch information
uhafner committed Aug 9, 2013
1 parent 2e19448 commit af19cb7029c6d06d4b16c7f824c4052318aebb87
Showing with 7 additions and 13 deletions.
  1. +3 −11 .settings/org.eclipse.core.resources.prefs
  2. +1 −1 pom.xml
  3. +3 −1 src/test/java/hudson/plugins/warnings/parser/ParserTester.java
@@ -1,4 +1,6 @@
<<<<<<< HEAD
=\=\=\=\=\=\=
<<<<<<<=HEAD
>>>>>>>=branch 'master' of https\://github.com/habast/warnings-plugin.git
eclipse.preferences.version=1
encoding//src/main/java=ISO-8859-1
encoding//src/main/resources=ISO-8859-1
@@ -7,13 +9,3 @@ encoding//src/test/resources=ISO-8859-1
encoding//src/test/resources/hudson/plugins/warnings/parser/issue7178.txt=UTF-8
encoding//target/generated-sources/localizer=ISO-8859-1
encoding/<project>=ISO-8859-1
=======
eclipse.preferences.version=1
encoding//src/main/java=ISO-8859-1
encoding//src/main/resources=ISO-8859-1
encoding//src/test/java=ISO-8859-1
encoding//src/test/resources=ISO-8859-1
encoding//src/test/resources/hudson/plugins/warnings/parser/issue7178.txt=UTF-8
encoding//target/generated-sources/localizer=ISO-8859-1
encoding/<project>=ISO-8859-1
>>>>>>> branch 'master' of https://github.com/habast/warnings-plugin.git
@@ -36,7 +36,7 @@
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.50</version>
<version>1.51</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
@@ -6,6 +6,8 @@
import java.io.Reader;
import java.io.UnsupportedEncodingException;

import org.apache.commons.lang.StringEscapeUtils;

import hudson.plugins.analysis.util.model.FileAnnotation;
import hudson.plugins.analysis.util.model.Priority;

@@ -38,7 +40,7 @@ protected void checkWarning(final FileAnnotation annotation, final int lineNumbe
assertEquals("Wrong number of ranges detected.", 1, warning.getLineRanges().size());
assertEquals("Wrong ranges start detected.", lineNumber, warning.getLineRanges().iterator().next().getStart());
assertEquals("Wrong ranges end detected.", lineNumber, warning.getLineRanges().iterator().next().getEnd());
assertEquals("Wrong message detected.", message, warning.getMessage());
assertEquals("Wrong message detected.", StringEscapeUtils.escapeXml(message), warning.getMessage());
assertEquals("Wrong filename detected.", fileName, warning.getFileName());
}

0 comments on commit af19cb7

Please sign in to comment.