String releaseTimeString = properties.getProperty("CurrentVersion/ReleaseTime");
if ((versionString == null) || (releaseTimeString == null)) {
logger.log(Level.INFO, "Invalid data parsed from properties.");
return;
}
Version version = Version.parse(versionString);
long releaseTime = 0;
try {
releaseTime = Long.parseLong(releaseTimeString);
} catch (NumberFormatException nfe1) {
/* ignore. */
}
if ((version == null) || (releaseTime == 0)) {
logger.log(Level.INFO, "Could not parse data from properties.");
return;
}
if (version.compareTo(currentLatestVersion) > 0) {
currentLatestVersion = version;
latestVersionDate = releaseTime;
logger.log(Level.INFO, String.format("Found new version: %s (%tc)", version, new Date(releaseTime)));
eventBus.post(new UpdateFoundEvent(version, releaseTime, edition));
}