Added FindsBugs warnings suppression.
This commit is contained in:
parent
be2ecfa2f9
commit
3b4404edbe
1 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||||
|
@ -229,4 +232,4 @@ public class VersionProcessor extends AbstractProcessor {
|
||||||
note("Generated source: " + fileName + " (" + new File(jfo.getName()).getAbsoluteFile().getParent() + ')');
|
note("Generated source: " + fileName + " (" + new File(jfo.getName()).getAbsoluteFile().getParent() + ')');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue