Fixed VersionInfo initialization.
This commit is contained in:
parent
746102ec54
commit
4e1c124510
1 changed files with 2 additions and 6 deletions
|
@ -71,16 +71,14 @@ 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);
|
||||||
final Properties p = new Properties();
|
final Properties p = new Properties();
|
||||||
|
|
||||||
try (FileReader reader = new FileReader(propsFile)) {
|
try (FileReader reader = new FileReader(propsFile)) {
|
||||||
p.load(reader);
|
p.load(reader);
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue