class JavaVersionProjectDescriptionCustomizer implements ProjectDescriptionCustomizer {

	private static final VersionRange KOTLIN_1_9_20_OR_LATER = VersionParser.DEFAULT.parseRange("3.2.0-RC2");

	private static final VersionRange SPRING_BOOT_3_2_4_OR_LATER = VersionParser.DEFAULT.parseRange("3.2.4");

	private static final List<String> UNSUPPORTED_VERSIONS = Arrays.asList("1.6", "1.7", "1.8");

	@Override
	public void customize(MutableProjectDescription description) {
		Version platformVersion = description.getPlatformVersion();
		String javaVersion = description.getLanguage().jvmVersion();
		if (UNSUPPORTED_VERSIONS.contains(javaVersion)) {
			updateTo(description, "17");
			return;
		}
		Integer javaGeneration = determineJavaGeneration(javaVersion);
		if (javaGeneration == null) {
			return;
		}
		if (javaGeneration < 17) {
			updateTo(description, "17");
		}
		if (javaGeneration == 21) {
			// Kotlin 1.9.20 is required
			if (description.getLanguage() instanceof KotlinLanguage && !KOTLIN_1_9_20_OR_LATER.match(platformVersion)) {
				updateTo(description, "17");
			}
		}
		if (javaGeneration == 22) {
			// Java 21 support as of Spring Boot 3.2.4
			if (!SPRING_BOOT_3_2_4_OR_LATER.match(platformVersion)) {
				updateTo(description, "21");
			}
		}
	}

	private void updateTo(MutableProjectDescription description, String jvmVersion) {
		Language language = Language.forId(description.getLanguage().id(), jvmVersion);
		description.setLanguage(language);
	}

	private Integer determineJavaGeneration(String javaVersion) {<FILL_FUNCTION_BODY>}

}

		try {
			int generation = Integer.parseInt(javaVersion);
			return ((generation > 9 && generation <= 22) ? generation : null);
		}
		catch (NumberFormatException ex) {
			return null;
		}
	
<no_super_class>