[java] Don't do forbidden API check for highest language level

For the highest language level, no API should be forbidden. #IDEA-349722 Fixed

GitOrigin-RevId: 4819e096b798d4cc4b328cc85671a7180851b219
This commit is contained in:
Bart van Helvert
2024-03-28 14:31:04 +01:00
committed by intellij-monorepo-bot
parent fe3c677584
commit c5bc52d9fd

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.module;
import com.intellij.openapi.application.ApplicationManager;
@@ -72,7 +72,7 @@ public final class LanguageLevelUtil {
static {
for (LanguageLevel level : LanguageLevel.values()) {
if (level.ordinal() > LanguageLevel.HIGHEST.ordinal()) break;
if (level.ordinal() >= LanguageLevel.HIGHEST.ordinal()) break;
int feature = level.feature() + 1;
ourPresentableShortMessage.put(level, feature >= 9 ? String.valueOf(feature) : "1." + feature);
}