question: 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 ) ; }
target:  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).