LanguageLevel (@NotNull MavenProject mavenProject, boolean useReleaseCompilerProp, boolean isSource, boolean isTest) { String mavenProjectReleaseLevel = useReleaseCompilerProp ? isTest ? mavenProject.getTestReleaseLevel() : mavenProject.getReleaseLevel() : null; LanguageLevel level = LanguageLevel.parse(mavenProjectReleaseLevel); if (level == null) { String mavenProjectLanguageLevel = getMavenLanguageLevel(mavenProject, isTest, isSource); level = LanguageLevel.parse(mavenProjectLanguageLevel); if (level == null && (StringUtil.isNotEmpty(mavenProjectLanguageLevel) || StringUtil.isNotEmpty(mavenProjectReleaseLevel))) { level = LanguageLevel.HIGHEST; } } return level; }