public static int parseVersionSpec ( String versionString ) throws NumberFormatException { if ( versionString == null ) return 0 ; int dot = versionString . indexOf ( ' ' ) ; int major , minor ; if ( dot > 0 ) { major = Integer . parseInt ( versionString . substring ( 0 , dot ) ) ; minor = Integer . parseInt ( versionString . substring ( dot + 1 ) ) ; } else { major = Integer . parseInt ( versionString ) ; minor = 0 ; } return major * 1000 + minor ; }
single digit without decimal means a major version not minor