private void versionReceived(String newVersion){
  LOGGER.info("Version checked: current:" + VERSION + "/new:"+ newVersion);
  if (newVersion == null) {
    return;
  }
  String[] split=newVersion.split(" ",2);
  newVersion=split[0];
  String newVersionInfo="";
  if (split.length > 1) {
    newVersionInfo=split[1];
  }
  String currentVersion=VERSION;
  boolean isBetaVersion=false;
  if (currentVersion.contains("b")) {
    currentVersion=currentVersion.substring(0,currentVersion.indexOf("b"));
    isBetaVersion=true;
  }
  int compare=compareVersions(currentVersion,newVersion);
  boolean isNewVersion=false;
  if ((compare == 0 && isBetaVersion) || compare == 1) {
    isNewVersion=true;
  }
  listener.versionChecked(newVersion,newVersionInfo,isNewVersion);
}

private void versionReceived ( String newVersion ) { LOGGER . info ( "Version checked: current:" + VERSION + "/new:" + newVersion ) ; if ( newVersion == null ) { return ; } String [ ] split = newVersion . split ( " " , 2 ) ; newVersion = split [ 0 ] ; String newVersionInfo = "" ; if ( split . length > 1 ) { newVersionInfo = split [ 1 ] ; } String currentVersion = VERSION ; boolean isBetaVersion = false ; if ( currentVersion . contains ( "b" ) ) { currentVersion = currentVersion . substring ( 0 , currentVersion . indexOf ( "b" ) ) ; isBetaVersion = true ; } int compare = compareVersions ( currentVersion , newVersion ) ; boolean isNewVersion = false ; if ( ( compare == 0 && isBetaVersion ) || compare == 1 ) { isNewVersion = true ; } listener . versionChecked ( newVersion , newVersionInfo , isNewVersion ) ; }
works with the received version string and compares it to the current version . expects a version in the format : " x . y . z info text " ( " info text " is optional ) .
