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.DefaultMustacheFactory;
import com.github.mustachejava.Mustache; import com.github.mustachejava.Mustache;
import com.github.mustachejava.MustacheFactory; import com.github.mustachejava.MustacheFactory;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import javax.annotation.processing.*; import javax.annotation.processing.*;
import javax.lang.model.SourceVersion; import javax.lang.model.SourceVersion;
@ -70,6 +71,7 @@ public class VersionProcessor extends AbstractProcessor {
messager.printMessage(Diagnostic.Kind.ERROR, (t != null ? t.toString() : s)); messager.printMessage(Diagnostic.Kind.ERROR, (t != null ? t.toString() : s));
} }
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN")
private VersionInfo findValues(final Version version) private VersionInfo findValues(final Version version)
throws IOException { throws IOException {
final VersionInfo versionInfo = new VersionInfo(version); final VersionInfo versionInfo = new VersionInfo(version);
@ -194,6 +196,7 @@ public class VersionProcessor extends AbstractProcessor {
log(Diagnostic.Kind.WARNING, s); log(Diagnostic.Kind.WARNING, s);
} }
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN")
private void writeTemplate(final String type, final VersionInfo versionInfo, final String template) private void writeTemplate(final String type, final VersionInfo versionInfo, final String template)
throws IOException { throws IOException {
final MustacheFactory mf = new DefaultMustacheFactory(); final MustacheFactory mf = new DefaultMustacheFactory();