Added FindsBugs warnings suppression.

This commit is contained in:
Erik C. Thauvin 2018-11-02 17:39:08 -07:00
parent be2ecfa2f9
commit 3b4404edbe

View file

@ -34,6 +34,7 @@ package net.thauvin.erik.semver;
import com.github.mustachejava.DefaultMustacheFactory;
import com.github.mustachejava.Mustache;
import com.github.mustachejava.MustacheFactory;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import javax.annotation.processing.*;
import javax.lang.model.SourceVersion;
@ -70,6 +71,7 @@ public class VersionProcessor extends AbstractProcessor {
messager.printMessage(Diagnostic.Kind.ERROR, (t != null ? t.toString() : s));
}
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN")
private VersionInfo findValues(final Version version)
throws IOException {
final VersionInfo versionInfo = new VersionInfo(version);
@ -194,6 +196,7 @@ public class VersionProcessor extends AbstractProcessor {
log(Diagnostic.Kind.WARNING, s);
}
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN")
private void writeTemplate(final String type, final VersionInfo versionInfo, final String template)
throws IOException {
final MustacheFactory mf = new DefaultMustacheFactory();
@ -229,4 +232,4 @@ public class VersionProcessor extends AbstractProcessor {
note("Generated source: " + fileName + " (" + new File(jfo.getName()).getAbsoluteFile().getParent() + ')');
}
}
}