MCPcopy Create free account
hub / github.com/evernat/dead-code-detector / close

Method close

src/main/java/dcd/Report.java:90–122  ·  view source on GitHub ↗
(long durationMillis, int suspectCount, int analyzedClassCount, File xmlReportFile)

Source from the content-addressed store, hash-verified

88 }
89
90 void close(long durationMillis, int suspectCount, int analyzedClassCount, File xmlReportFile)
91 throws IOException, XMLStreamException {
92 log("Duration: " + durationMillis + "ms");
93 log(suspectCount + " suspect methods (or fields or variables), " + analyzedClassCount
94 + " analyzed classes");
95 if (xmlReportFile != null) {
96 log("Xml report written to " + xmlReportFile.getPath());
97 }
98 log("");
99
100 if (xmlStreamWriter != null) {
101 try {
102 try {
103 xmlStreamWriter.writeCharacters(XML_INDENT);
104 xmlStreamWriter.writeStartElement("summary");
105 xmlStreamWriter.writeAttribute("durationMillis",
106 String.valueOf(durationMillis));
107 xmlStreamWriter.writeAttribute("suspectCount", String.valueOf(suspectCount));
108 xmlStreamWriter.writeAttribute("analyzedClassCount",
109 String.valueOf(analyzedClassCount));
110 xmlStreamWriter.writeEndElement();
111 xmlStreamWriter.writeCharacters(XML_END_OF_LINE);
112
113 xmlStreamWriter.writeEndElement();
114 xmlStreamWriter.writeCharacters(XML_END_OF_LINE);
115 } finally {
116 xmlStreamWriter.close();
117 }
118 } finally {
119 output.close();
120 }
121 }
122 }
123
124 void reportDeadCodeSuspects(boolean publicDeadCode, String asmClassName, Set<String> descs)
125 throws XMLStreamException {

Callers 4

runMethod · 0.80
createClassReaderMethod · 0.80

Calls 1

logMethod · 0.95

Tested by

no test coverage detected