private static boolean isReplacementJar ( File file1 , File file2 ) { if ( file1 == null ) { return true ; } else if ( file2 == null ) { return false ; } else { String version1 = extractVersion ( file1 . getName ( ) ) ; String version2 = extractVersion ( file2 . getName ( ) ) ; return compare ( version1 , version2 ) < 0 ; } }
Returns whether file2 can replace file1 as the install map jar .