formattersWriteToStdOut = formattersWriteToStdOut || (outFile == null);
formattersWriteToStdOut = formattersWriteToStdOut || outFile == null;
    public void execute()    {        if (origFiles == null || newFiles == null)        {            throw new BuildException("Missing nested filesetes origFiles and newFiles.", getLocation());        }        if (newClassPath == null)        {            newClassPath = new Path(getProject());        }        if (origClassPath == null)        {            origClassPath = new Path(getProject());        }        final File[] origJars = scanFileSet(origFiles);        final File[] newJars = scanFileSet(newFiles);        final ClassLoader origThirdPartyLoader = createClasspathLoader(origClassPath);        final ClassLoader newThirdPartyLoader = createClasspathLoader(newClassPath);        final Checker checker = new Checker();        final ChangeCounter counter = new ChangeCounter();        boolean formattersWriteToStdOut = false;        for (Iterator it = formatters.iterator(); it.hasNext();)        {            Formatter formatter = (Formatter) it.next();            final String type = formatter.getType();            final String outFile = formatter.getOutFile();            formattersWriteToStdOut = formattersWriteToStdOut || (outFile == null);            try            {                if (FORMATTER_TYPE_PLAIN.equals(type))                {                    checker.addDiffListener(new PlainDiffListener(outFile));                }                else if (FORMATTER_TYPE_XML.equals(type))                {                    checker.addDiffListener(new XmlDiffListener(outFile));                }            }            catch (IOException ex)            {                log("unable to initialize formatter: " + ex.getMessage(), Project.MSG_WARN);            }        }        if (!formattersWriteToStdOut)        {            checker.addDiffListener(new AntLogger(this));        }        checker.addDiffListener(counter);        checker.reportDiffs(origJars, newJars, origThirdPartyLoader, newThirdPartyLoader);        if (counter.getWarnings() > 0 && failOnWarning || counter.getErrors() > 0 && failOnError)        {            throw new BuildException("detected incompatible API changes");        }    }