mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-02-24 19:35:16 +01:00
checkstyle corrections
This commit is contained in:
@@ -25,7 +25,6 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import org.apache.maven.MavenExecutionException;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
import org.apache.maven.plugin.MojoFailureException;
|
||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
@@ -130,9 +129,9 @@ public class AggregateMojo extends BaseDependencyCheckMojo {
|
||||
try {
|
||||
writeReports(engine, current, outputDir);
|
||||
} catch (ReportException ex) {
|
||||
ExceptionCollection exCol = (ExceptionCollection) engine.getExecutionRoot().getContextValue(AGGREGATE_EXCEPTIONS);
|
||||
ExceptionCollection exCol = (ExceptionCollection) engine.getExecutionRoot().getContextValue(AGGREGATE_EXCEPTIONS);
|
||||
if (exCol == null) {
|
||||
exCol = new ExceptionCollection("Error writing aggregate report",ex);
|
||||
exCol = new ExceptionCollection("Error writing aggregate report", ex);
|
||||
} else {
|
||||
exCol.addException(ex);
|
||||
}
|
||||
|
||||
@@ -85,12 +85,13 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
|
||||
/**
|
||||
* Returns if the mojo should fail the build if an exception occurs.
|
||||
*
|
||||
* @return whether or not the mojo should fail the build
|
||||
*/
|
||||
protected boolean isFailOnError() {
|
||||
return failOnError;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The Maven Project Object.
|
||||
*/
|
||||
@@ -1079,8 +1080,8 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
* scan data between the "check" and "aggregate" phase.
|
||||
*
|
||||
* @param project the Maven project to read the data file from
|
||||
* @return a <code>MavenEngine</code> object populated with dependencies if the
|
||||
* serialized data file exists; otherwise <code>null</code> is returned
|
||||
* @return a <code>MavenEngine</code> object populated with dependencies if
|
||||
* the serialized data file exists; otherwise <code>null</code> is returned
|
||||
*/
|
||||
protected List<Dependency> readDataFile(MavenProject project) {
|
||||
final Object oPath = project.getContextValue(this.getDataFileContextKey());
|
||||
|
||||
@@ -106,7 +106,7 @@ public class CheckMojo extends BaseDependencyCheckMojo {
|
||||
writeReports(engine, getProject(), getCorrectOutputDirectory());
|
||||
} catch (ReportException ex) {
|
||||
if (this.isFailOnError()) {
|
||||
if (exCol!= null) {
|
||||
if (exCol != null) {
|
||||
exCol.addException(ex);
|
||||
} else {
|
||||
exCol = new ExceptionCollection("Unable to write the dependency-check report", ex);
|
||||
|
||||
@@ -111,5 +111,4 @@ public class UpdateMojo extends BaseDependencyCheckMojo {
|
||||
public String getDescription(Locale locale) {
|
||||
return "Updates the local cache of the NVD data from NIST.";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user