Sdk (@NotNull JavaVersion version) { int mockJdk = version.feature >= 21 ? 21 : version.feature >= 11 ? 11 : version.feature >= 9 ? 9 : version.feature >= 7 ? version.feature : version.feature >= 5 ? 7 : 4; if (mockJdk > 9) { return createMockJdkFromRepository("java " + version, mockJdk); } String path = getPathForJdkNamed(MOCK_JDK_DIR_NAME_PREFIX + "1." + mockJdk).getPath(); return createMockJdk("java " + version, path); }