mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-13 23:33:37 +01:00
updated test case to build serialized hashmap for CWE version 2.5 for issue #68
Former-commit-id: 9f39e0eb71be6814ddf2f172a9f2f820b43dc1ef
This commit is contained in:
@@ -59,11 +59,26 @@ public class CweDBTest {
|
||||
// SAXParser saxParser = factory.newSAXParser();
|
||||
//
|
||||
// CweHandler handler = new CweHandler();
|
||||
// File file = new File(this.getClass().getClassLoader().getResource("cwe.2000.xml").getPath());
|
||||
// //File file = new File(this.getClass().getClassLoader().getResource("cwe.2000.xml").getPath());
|
||||
// File file = new File(this.getClass().getClassLoader().getResource("cwec_v2.5.xml").getPath());
|
||||
//
|
||||
// saxParser.parse(file, handler);
|
||||
// System.out.println("Found " + handler.getCwe().size() + " cwe entries.");
|
||||
// Map<String,String> cwe = handler.getCwe();
|
||||
// Map<String, String> cwe = handler.getCwe();
|
||||
//// FileOutputStream fout = new FileOutputStream("target/current.csv");
|
||||
//// //FileOutputStream fout = new FileOutputStream("target/new.csv");
|
||||
//// PrintWriter writer = new PrintWriter(fout);
|
||||
//// for (Map.Entry<String, String> entry : cwe.entrySet()) {
|
||||
//// writer.print('"');
|
||||
//// writer.print(entry.getKey());
|
||||
//// writer.print('"');
|
||||
//// writer.print(',');
|
||||
//// writer.print('"');
|
||||
//// writer.print(entry.getValue());
|
||||
//// writer.println('"');
|
||||
//// }
|
||||
//// writer.close();
|
||||
//
|
||||
// FileOutputStream fout = new FileOutputStream("src/main/resources/data/cwe.hashmap.serialized");
|
||||
// ObjectOutputStream objOut = new ObjectOutputStream(fout);
|
||||
// objOut.writeObject(cwe);
|
||||
|
||||
Reference in New Issue
Block a user