@Override public void finish() { try { Project project = getProject(); if (project == null) { throw new NullPointerException("No project"); } getBugCollection().bugsPopulated(); getBugCollection().writeXML(outputStream); outputStream.close(); } catch (IOException e) { throw new FatalException("Error writing XML output: " + e.getMessage(), e); } }
XMLBugReporter xmlBugReporter = new XMLBugReporter(project); xmlBugReporter.setPriorityThreshold(determinePriorityThreshold()); xmlBugReporter.setAddMessages(true); xmlBugReporter.setOutputStream(new PrintStream(xmlOutput)); if(findbugsReport.exists() && findbugsReport.length() > 0) { LOG.info("FindBugs report is already generated {}. Reusing the report.",findbugsReport.getAbsolutePath()); xmlBugReporter.getBugCollection().readXML(new FileReader(findbugsReport)); foundExistingReport = true; break reportPaths; executorService.submit(new FindbugsTask(engine)).get(configuration.getTimeout(), TimeUnit.MILLISECONDS); return toReportedBugs(xmlBugReporter.getBugCollection()); } catch (TimeoutException e) { throw new IllegalStateException("Can not execute Findbugs with a timeout threshold value of " + configuration.getTimeout() + " milliseconds", e);
break; case XML_REPORTER: { XMLBugReporter xmlBugReporter = new XMLBugReporter(project); xmlBugReporter.setAddMessages(xmlWithMessages); xmlBugReporter.setMinimalXML(xmlMinimal);
/** * @param xmlMinimal */ public void setMinimalXML(boolean xmlMinimal) { getBugCollection().setMinimalXML(xmlMinimal); }
break; case XML_REPORTER: { XMLBugReporter xmlBugReporter = new XMLBugReporter(project); xmlBugReporter.setAddMessages(xmlWithMessages); xmlBugReporter.setMinimalXML(xmlMinimal);
public void setAddMessages(boolean enable) { getBugCollection().setWithMessages(enable); }
@Override public void finish() { try { Project project = getProject(); if (project == null) { throw new NullPointerException("No project"); } getBugCollection().bugsPopulated(); getBugCollection().writeXML(outputStream); outputStream.close(); } catch (IOException e) { throw new FatalException("Error writing XML output: " + e.getMessage(), e); } }
/** * @param xmlMinimal */ public void setMinimalXML(boolean xmlMinimal) { getBugCollection().setMinimalXML(xmlMinimal); }
public void setAddMessages(boolean enable) { getBugCollection().setWithMessages(enable); }