Skip to content

Commit 4dde8f4

Browse files
committed
Say why the IDE plugin still calls TrustedProjects.isTrusted
The comment said that its replacement, com.intellij.ide.trustedProjects.TrustedProjects, is @ApiStatus.Internal. It is in 2024.2, but from 2025.1 that class is public, and its isProjectTrusted replaces isTrusted, deprecated since. The plugin still supports 2024.2, so the call stays until sinceBuild reaches 251.
1 parent 1b8de42 commit 4dde8f4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎open-java-format-idea-plugin/src/main/java/com/palantir/javaformat/intellij/PalantirJavaFormatFormattingService.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ protected FormattingTask createFormattingTask(AsyncFormattingRequest request) {
8888
}
8989

9090
static boolean isTrusted(Project project) {
91-
// The marketplace verifier reports this class as experimental, and newer IDEs also deprecate it. It stays:
92-
// its replacement, com.intellij.ide.trustedProjects.TrustedProjects, is @ApiStatus.Internal — a worse thing
93-
// for a plugin to call.
91+
// TrustedProjects.isTrusted is @ApiStatus.Experimental, and deprecated since 2025.1. Its replacement,
92+
// com.intellij.ide.trustedProjects.TrustedProjects.isProjectTrusted, is public only from 2025.1, and this
93+
// plugin still supports 2024.2: switch to it when sinceBuild reaches 251.
9494
return TrustedProjects.isTrusted(project);
9595
}
9696

0 commit comments

Comments
 (0)