mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-02-24 19:35:16 +01:00
checkstyle/findbugs/pmd corrections
Former-commit-id: 7e1758362e3e3da13678e5e2a8bffa28b8ad5a87
This commit is contained in:
@@ -149,7 +149,7 @@ public class AggregateMojo extends BaseDependencyCheckMojo {
|
||||
if (mpp.compareTo(mod.getBasedir()) == 0 && descendants.add(mod)) {
|
||||
if (getLog().isDebugEnabled()) {
|
||||
getLog().debug(String.format("Decendent module %s added", mod.getName()));
|
||||
};
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
if (getLog().isDebugEnabled()) {
|
||||
|
||||
@@ -67,10 +67,6 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
* The properties file location.
|
||||
*/
|
||||
private static final String PROPERTIES_FILE = "mojo.properties";
|
||||
/**
|
||||
* Name of the logging properties file.
|
||||
*/
|
||||
private static final String LOG_PROPERTIES_FILE = "log.properties";
|
||||
/**
|
||||
* System specific new line character.
|
||||
*/
|
||||
@@ -949,10 +945,11 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
|
||||
} else {
|
||||
file = new File(writeTo, dataFileName);
|
||||
}
|
||||
File parent = file.getParentFile();
|
||||
final File parent = file.getParentFile();
|
||||
if (!parent.isDirectory()) {
|
||||
if (parent.mkdirs()) {
|
||||
getLog().error(String.format("Directory '%s' does not exist and cannot be created; unable to write data file.", parent.getAbsolutePath()));
|
||||
getLog().error(String.format("Directory '%s' does not exist and cannot be created; unable to write data file.",
|
||||
parent.getAbsolutePath()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,22 +18,32 @@
|
||||
package org.owasp.dependencycheck.maven.slf4j;
|
||||
|
||||
import org.apache.maven.plugin.logging.Log;
|
||||
import org.slf4j.helpers.FormattingTuple;
|
||||
import org.slf4j.helpers.MarkerIgnoringBase;
|
||||
import org.slf4j.helpers.MessageFormatter;
|
||||
|
||||
/**
|
||||
* Created by colezlaw on 6/14/15.
|
||||
* Created on 6/14/15.
|
||||
*
|
||||
* @author colezlaw
|
||||
*/
|
||||
public class MavenLoggerAdapter extends MarkerIgnoringBase {
|
||||
|
||||
private Log log;
|
||||
|
||||
/**
|
||||
* Creates a new Maven Logger Adapter.
|
||||
*
|
||||
* @param log the maven log
|
||||
*/
|
||||
public MavenLoggerAdapter(Log log) {
|
||||
super();
|
||||
this.log = log;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isTraceEnabled() {
|
||||
if (log != null) {
|
||||
|
||||
@@ -22,7 +22,9 @@ import org.slf4j.ILoggerFactory;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
/**
|
||||
* Created by colezlaw on 6/14/15.
|
||||
* Created on 6/14/15.
|
||||
*
|
||||
* @author colezlaw
|
||||
*/
|
||||
public class MavenLoggerFactory implements ILoggerFactory {
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
|
||||
/**
|
||||
* Maven mojos have their own logger, so we'll use one of those
|
||||
*/
|
||||
private Log log;
|
||||
private Log log = null;
|
||||
|
||||
/**
|
||||
* Set the Task which will this is to log through.
|
||||
@@ -70,7 +70,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
|
||||
private static final String loggerFactoryClassStr = MavenLoggerFactory.class.getName();
|
||||
|
||||
/**
|
||||
* The ILoggerFactory instance returned by the {@link #getLoggerFactory} method should always be the smae object
|
||||
* The ILoggerFactory instance returned by the {@link #getLoggerFactory} method should always be the same object
|
||||
*/
|
||||
private ILoggerFactory loggerFactory;
|
||||
|
||||
@@ -83,6 +83,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
|
||||
*
|
||||
* @return the logger factory
|
||||
*/
|
||||
@Override
|
||||
public ILoggerFactory getLoggerFactory() {
|
||||
return loggerFactory;
|
||||
}
|
||||
@@ -92,6 +93,7 @@ public class StaticLoggerBinder implements LoggerFactoryBinder {
|
||||
*
|
||||
* @return the logger factory class string
|
||||
*/
|
||||
@Override
|
||||
public String getLoggerFactoryClassStr() {
|
||||
return loggerFactoryClassStr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user