static void assertVersionCompatible ( final String expectedVersion , final String actualVersion ) { final String shortActualVersion = actualVersion . replaceAll ( VERSION_BUILD_PART_REGEX , "" ) ; final String shortExpectedVersion = expectedVersion . replaceAll ( VERSION_BUILD_PART_REGEX , "" ) ; if ( shortExpectedVersion . compareTo ( shortActualVersion ) != 0 ) { throw new JsiiException ( "Incompatible jsii-runtime version. Expecting " + shortExpectedVersion + ", actual was " + shortActualVersion ) ; } }
Asserts that a peer runtimeVersion is compatible with this Java runtime version which means they share the same version components with the possible exception of the build number .