nl_tokens: Decides if the operating system version matches . <p > This method is package private instead of private to support unit test invocation . < / p >
pl_tokens: static boolean isOSVersionMatch ( final String osVersion , final String osVersionPrefix ) { if ( osVersion == null || osVersion . trim ( ) . isEmpty ( ) ) { return false ; } // Compare parts of the version string instead of using String.startsWith(String) because otherwise // osVersionPrefix 10.1 would also match osVersion 10.10 String [ ] versionPrefixParts = osVersionPrefix . split ( "\\." ) ; String [ ] versionParts = osVersion . split ( "\\." ) ; for ( int i = 0 ; i < Math . <mask> ( versionPrefixParts . length , versionParts . length ) ; i ++ ) { if ( ! versionPrefixParts [ i ] . equals ( versionParts [ i ] ) ) { return false ; } } return true ; }