Fixed VersionInfo initialization.

This commit is contained in:
Erik C. Thauvin 2017-04-22 10:01:07 -07:00
parent 746102ec54
commit 4e1c124510

View file

@ -71,11 +71,9 @@ public class VersionProcessor extends AbstractProcessor {
private VersionInfo findValues(final Version version) private VersionInfo findValues(final Version version)
throws IOException { throws IOException {
final VersionInfo versionInfo; final VersionInfo versionInfo = new VersionInfo(version);
if (version.properties().length() > 0) { if (version.properties().length() > 0) {
versionInfo = new VersionInfo();
final File propsFile = new File(version.properties()); final File propsFile = new File(version.properties());
if (propsFile.exists()) { if (propsFile.exists()) {
note("Found properties: " + propsFile); note("Found properties: " + propsFile);
@ -95,8 +93,6 @@ public class VersionProcessor extends AbstractProcessor {
error("Could not find: " + propsFile); error("Could not find: " + propsFile);
throw new FileNotFoundException(propsFile + " (The system cannot find the file specified)"); throw new FileNotFoundException(propsFile + " (The system cannot find the file specified)");
} }
} else {
versionInfo = new VersionInfo(version);
} }
return versionInfo; return versionInfo;