Adrninistrator / java-all-call-graph

Generate all call graph for Java Code.
Apache License 2.0
426 stars 110 forks source link

RunnerGenAllGraph4Callee#doCombineClassFile结果合并会清空原文件 #64

Closed zhzhdoai closed 5 months ago

zhzhdoai commented 5 months ago

最后会调用JavaCGFileUtil.class#genBufferedWriter public static BufferedWriter genBufferedWriter(String filePath) throws FileNotFoundException { return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filePath), StandardCharsets.UTF_8)); }

应该写成 new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filePath, true), StandardCharsets.UTF_8));

Adrninistrator commented 5 months ago

最新的版本没有做合并的处理了,还同提交,我改一下这个方法,支持指定是否覆盖