Fix warnings in yang-maven-plugin
[yangtools.git] / yang / yang-maven-plugin / src / main / java / org / opendaylight / yangtools / yang2sources / plugin / YangToSourcesMojo.java
index 7ad534a6de0f245052e568d1b44546bc54079e82..8ecc6f230a75b337456239cd356753a0137627b4 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.yangtools.yang2sources.plugin;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.Collections2;
 import com.google.common.collect.ImmutableList;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.File;
 import java.util.Arrays;
 import java.util.Collection;
@@ -95,10 +96,7 @@ public final class YangToSourcesMojo extends AbstractMojo {
     private String yangSkip;
 
     public YangToSourcesMojo() {
-    }
 
-    public void setProject(final MavenProject project) {
-        this.project = project;
     }
 
     @VisibleForTesting
@@ -106,7 +104,12 @@ public final class YangToSourcesMojo extends AbstractMojo {
         this.yangToSourcesProcessor = processor;
     }
 
+    public void setProject(final MavenProject project) {
+        this.project = project;
+    }
+
     @Override
+    @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "yangFilesRootDir")
     public void execute() throws MojoExecutionException, MojoFailureException {
         Util.checkClasspath(project, repoSystem, localRepository, remoteRepos);