LanguageLevel (@NotNull Project project, @NotNull LanguageLevel level) { if (!AcceptedLanguageLevelsSettings.isLanguageLevelAccepted(level)) { LanguageLevel highestAcceptedLevel = AcceptedLanguageLevelsSettings.getHighestAcceptedLevel(); if (highestAcceptedLevel.isLessThan(level)) { MavenProjectsManager.getInstance(project).getSyncConsole() .addBuildIssue(new NonAcceptedJavaLevelIssue(level), MessageEvent.Kind.WARNING); } level = highestAcceptedLevel.isAtLeast(level) ? LanguageLevel.HIGHEST : highestAcceptedLevel; } return level; }