question: protected static boolean versionCompatible ( String currentVersion , String expectedVersion ) { if ( Character . isDigit ( expectedVersion . charAt ( expectedVersion . length ( ) - 1 ) ) ) { if ( ! currentVersion . startsWith ( expectedVersion ) ) { return false ; } } else { boolean backwardCom = false ; int compareLength = Math . min ( expectedVersion . length ( ) - 1 , currentVersion . length ( ) ) ; if ( expectedVersion . endsWith ( "-" ) ) { backwardCom = true ; } for ( int i = 0 ; i < compareLength ; i ++ ) { if ( backwardCom ) { if ( expectedVersion . charAt ( i ) < currentVersion . charAt ( i ) ) { return false ; } } else { if ( currentVersion . charAt ( i ) > expectedVersion . charAt ( i ) ) { break ; } if ( currentVersion . charAt ( i ) < expectedVersion . charAt ( i ) ) { return false ; } } } } return true ; }
target:  Check whether the version String is compatible with expected.