Skip to content

Commit

Permalink
change Integer.parseInt to IntegerParser.parseInt
Browse files Browse the repository at this point in the history
  • Loading branch information
mso committed Jul 26, 2023
1 parent 92d5b10 commit 22f68a0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.List;
import java.util.Optional;

import edu.hm.hafner.analysis.util.IntegerParser;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.text.StringEscapeUtils;
import org.w3c.dom.Document;
Expand Down Expand Up @@ -43,13 +44,11 @@ private Report parseProblems(final List<Element> elements) {
if (problemClass.isPresent()) {
Element problem = problemClass.get();
issueBuilder.setFileName(stripPathPrefix(file))
.setLineStart(IntegerParser.parseInt(getChildValue(element, "line")))
.setCategory(StringEscapeUtils.unescapeXml(getValue(problem)))
.setMessage(StringEscapeUtils.unescapeXml(getChildValue(element, "description")))
.setModuleName(StringEscapeUtils.unescapeXml(getChildValue(element, "module")))
.setSeverity(getPriority(problem.getAttribute("severity")));
if(!getChildValue(element, "line").equals("-")){
issueBuilder.setLineStart(Integer.parseInt(getChildValue(element, "line")));
}
problems.add(issueBuilder.buildAndClean());
}
}
Expand Down

0 comments on commit 22f68a0

Please sign in to comment.