findbugs correction

Former-commit-id: 55b3830b5d31908e452ea6c688b0213aa04a7f41
This commit is contained in:
Jeremy Long
2015-05-11 20:31:36 -04:00
parent 659248ff22
commit 29c47e3e96

View File

@@ -429,11 +429,9 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
*/ */
protected File getCorrectOutputDirectory(MavenProject current) { protected File getCorrectOutputDirectory(MavenProject current) {
final Object obj = current.getContextValue(getOutputDirectoryContextKey()); final Object obj = current.getContextValue(getOutputDirectoryContextKey());
if (obj != null) { if (obj != null && obj instanceof File) {
if (obj instanceof File) {
return (File) obj; return (File) obj;
} }
}
File target = new File(current.getBuild().getDirectory()); File target = new File(current.getBuild().getDirectory());
if (target.getParentFile() != null && "target".equals(target.getParentFile().getName())) { if (target.getParentFile() != null && "target".equals(target.getParentFile().getName())) {
target = target.getParentFile(); target = target.getParentFile();