X-Git-Url: http://jaekl.net/gitweb/?p=cfb.git;a=blobdiff_plain;f=prod%2Fnet%2Fjaekl%2Fcfb%2Fanalyze%2FAnalyzer.java;h=d1aa115e9d6ab3418c1f20979ad3fa446d7737b8;hp=03aeb1c6a4db718198e2eca9da9b9538829eab39;hb=2769cf82ccae57ee3716aecc9bd694be1f115d92;hpb=3c10b6100c6035a65ce37dea846b027135289f67 diff --git a/prod/net/jaekl/cfb/analyze/Analyzer.java b/prod/net/jaekl/cfb/analyze/Analyzer.java index 03aeb1c..d1aa115 100644 --- a/prod/net/jaekl/cfb/analyze/Analyzer.java +++ b/prod/net/jaekl/cfb/analyze/Analyzer.java @@ -6,16 +6,17 @@ import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.text.MessageFormat; +import java.util.Date; import java.util.Locale; import java.util.Locale.Category; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - import net.jaekl.cfb.CfbBundle; import net.jaekl.cfb.util.Command; import net.jaekl.qd.xml.XmlParseException; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + public class Analyzer { MessageMap m_msgMap; @@ -23,9 +24,10 @@ public class Analyzer { m_msgMap = msgMap; } - public Analysis analyze(PrintWriter pw, File workDir, File fbp, String buildNumber) throws IOException, XmlParseException, SAXException + public Analysis analyze(PrintWriter pw, File workDir, File fbp, String projName, String buildNumber) + throws IOException, XmlParseException, SAXException { - Analysis result = new Analysis(buildNumber); + Analysis result = new Analysis(projName, buildNumber); File fbOutput = outputWorkFile(workDir, fbp); @@ -33,6 +35,8 @@ public class Analyzer { pw.println(cmdLine); pw.flush(); Command.Result fbResult = new Command().exec(cmdLine); + pw.println("==> " + fbResult.getRetCode()); + pw.flush(); if (0 != fbResult.getRetCode()) { // Our attempt to execute FindBugs failed. // Report the error and return null. @@ -46,8 +50,9 @@ public class Analyzer { return null; } + result.setEnd(new Date()); result.parse(new InputSource(fbOutput.getAbsolutePath())); - result.dump(pw); + // result.dump(pw); return result; }