
org.sonar.plugins.findbugs.AnalysisResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-findbugs-plugin
Show all versions of sonar-findbugs-plugin
SpotBugs is a program that uses static analysis to look for bugs in Java code. It can detect a variety of common coding mistakes, including thread synchronization problems, misuse of API methods.
/*
* SonarQube Findbugs Plugin
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
package org.sonar.plugins.findbugs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import edu.umd.cs.findbugs.AnalysisError;
import edu.umd.cs.findbugs.BugInstance;
/**
* @author gtoison
*
*/
public class AnalysisResult {
private Collection reportedBugs;
private Collection analysisErrors;
public AnalysisResult() {
this(new ArrayList<>(), new ArrayList<>());
}
public AnalysisResult(BugInstance bugInstance) {
this(Arrays.asList(new ReportedBug(bugInstance)), new ArrayList<>());
}
public AnalysisResult(Collection reportedBugs, Collection extends AnalysisError> errors) {
this.reportedBugs = reportedBugs;
this.analysisErrors = new ArrayList<>(errors);
}
public Collection getReportedBugs() {
return reportedBugs;
}
public Collection getAnalysisErrors() {
return analysisErrors;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy