Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-lang3-api</artifactId>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-text-api</artifactId>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.thalesgroup.hudson.plugins.cppcheck;

import com.thalesgroup.hudson.plugins.cppcheck.config.CppcheckConfig;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

public class CppcheckMetricUtil {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import hudson.model.AbstractBuild;
import hudson.model.Api;
import hudson.model.Item;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.Exported;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import hudson.model.Run;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.LineIterator;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;


import java.io.*;
Expand Down Expand Up @@ -185,7 +185,7 @@
* @param message the message to write
*/
private void outputEscaped(final StringBuilder output, final String message) {
output.append(StringEscapeUtils.escapeHtml(message));
output.append(StringEscapeUtils.escapeHtml4(message));

Check warning on line 188 in src/main/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckSource.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 188 is not covered by tests
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import hudson.model.ModelObject;

import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.text.StringEscapeUtils;
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;

Expand Down Expand Up @@ -114,38 +114,38 @@
}

public String getMessageHtml() {
return StringEscapeUtils.escapeHtml(message);
return StringEscapeUtils.escapeHtml4(message);
}

public void setMessage(String message) {
this.message = message;
}

@Exported
public String getSeverity() {
return severity;
}

public void setSeverity(String severity) {
this.severity = severity;
}

@Exported
public Integer getKey() {
return key;
}

public void setKey(Integer key) {
this.key = key;
}

@Exported
public String getVerbose() {
return verbose;
}

public String getVerboseHtml() {
return StringEscapeUtils.escapeHtml(verbose);
return StringEscapeUtils.escapeHtml4(verbose);

Check warning on line 148 in src/main/java/com/thalesgroup/hudson/plugins/cppcheck/model/CppcheckFile.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 117-148 are not covered by tests
}

public void setVerbose(String verbose) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import hudson.model.Run;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.jenkinsci.plugins.cppcheck.CppcheckDiffState;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
mergeReport(cppcheckReportResult, cppcheckReport);
}
} catch (Exception e) {
String stack_trace = org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(e);
String stack_trace = org.apache.commons.lang3.exception.ExceptionUtils.getStackTrace(e);

Check warning on line 73 in src/main/java/org/jenkinsci/plugins/cppcheck/CppcheckParserResult.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 73 is not covered by tests
CppcheckLogger.log(listener, "Parsing throws exceptions. " + e.getMessage());
CppcheckLogger.log(listener, stack_trace);
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import hudson.model.Api;
import hudson.model.Item;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.jenkinsci.plugins.cppcheck.config.CppcheckConfigSeverityEvaluation;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.Collection;

import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.text.StringEscapeUtils;

import com.thalesgroup.hudson.plugins.cppcheck.model.CppcheckWorkspaceFile;

Expand Down Expand Up @@ -133,7 +133,7 @@
builder.append("<span class=\"lineNumber\">");
builder.append(String.format(numberFormat, current));
builder.append("</span> ");// The space separates line number and code
builder.append(StringEscapeUtils.escapeHtml(line));
builder.append(StringEscapeUtils.escapeHtml4(line));

Check warning on line 136 in src/main/java/org/jenkinsci/plugins/cppcheck/CppcheckSourceAll.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 136 is not covered by tests
builder.append("</div>\n");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jenkinsci.plugins.cppcheck.util;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

/**
* @author Gregory Boissinot
Expand Down
Loading