package net.jaekl.cfb.analyze;
+// Copyright (C) 2015 Christian Jaekl
+
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.Locale.Category;
+import org.xml.sax.SAXException;
+
import net.jaekl.cfb.CfbBundle;
import net.jaekl.cfb.util.Command;
+import net.jaekl.qd.xml.XmlParseException;
public class Analyzer {
File m_findbugsDir;
m_findbugsDir = findbugsDir;
}
- public Analysis analyze(PrintWriter pw, File workDir, File fbp) throws IOException {
+ public Analysis analyze(PrintWriter pw, File workDir, File fbp) throws IOException, XmlParseException {
Analysis result = new Analysis();
File fbOutput = outputWorkFile(workDir, fbp);
}
result = parseFbOutput(fbOutput);
-
+ result.dump(pw);
return result;
}
// Parse the output.xml that resulted from a FindBugs run,
// and store its findings into an Analysis object.
- Analysis parseFbOutput(File fbOutput)
+ Analysis parseFbOutput(File fbOutput) throws XmlParseException
{
- return null;
+ Analysis result = new Analysis();
+ try {
+ result.parse(fbOutput);
+ } catch (IOException | SAXException exc) {
+ throw new XmlParseException(exc);
+ }
+ return result;
}
}