mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-23 17:41:28 +01:00
updated to use UTF-8
Former-commit-id: 61fc6d7e5feeedbc74988b5a57639c3e298d01de
This commit is contained in:
@@ -133,6 +133,7 @@ public class SuppressionHandler extends DefaultHandler {
|
|||||||
rule.addCve(currentText.toString());
|
rule.addCve(currentText.toString());
|
||||||
} else if (CVSS_BELOW.equals(qName)) {
|
} else if (CVSS_BELOW.equals(qName)) {
|
||||||
final float cvss = Float.parseFloat(currentText.toString());
|
final float cvss = Float.parseFloat(currentText.toString());
|
||||||
|
rule.addCvssBelow(cvss);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class SuppressionParser {
|
|||||||
xmlReader.setContentHandler(handler);
|
xmlReader.setContentHandler(handler);
|
||||||
|
|
||||||
final InputStream inputStream = new FileInputStream(file);
|
final InputStream inputStream = new FileInputStream(file);
|
||||||
final Reader reader = new InputStreamReader(inputStream); //, "UTF-8");
|
final Reader reader = new InputStreamReader(inputStream, "UTF-8");
|
||||||
final InputSource in = new InputSource(reader);
|
final InputSource in = new InputSource(reader);
|
||||||
//in.setEncoding("UTF-8");
|
//in.setEncoding("UTF-8");
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class SuppressionHandlerTest {
|
|||||||
xmlReader.setContentHandler(handler);
|
xmlReader.setContentHandler(handler);
|
||||||
|
|
||||||
InputStream inputStream = new FileInputStream(file);
|
InputStream inputStream = new FileInputStream(file);
|
||||||
Reader reader = new InputStreamReader(inputStream); //, "UTF-8");
|
Reader reader = new InputStreamReader(inputStream, "UTF-8");
|
||||||
InputSource in = new InputSource(reader);
|
InputSource in = new InputSource(reader);
|
||||||
//in.setEncoding("UTF-8");
|
//in.setEncoding("UTF-8");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user