Package net.pterodactylus.util.version

Examples of net.pterodactylus.util.version.Version


    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));
    }
View Full Code Here

TOP

Related Classes of net.pterodactylus.util.version.Version

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.