Repository navigation
fix: no IntelliJ API scheduled for removal, and no deprecated getClassLoader(), on any supported IntelliJ - #2277
Merged
lagergren merged 2 commits intoNov 26, 2026
Conversation
…s without IntelliJ API scheduled for removal The plugin verifier reports `FileUtil.delete(Path)` as an API scheduled for removal, and deprecated, on 2025.2 and later, from `DownloadTask.moveContentInto`, which `stripRootFolder` uses to replace the files and folders of an earlier install (redhat-developer#2057). `moveContentInto` now deletes them with `NioFiles.deleteRecursively(Path)`. It's public on all the supported versions, 2024.2 to 2026.3, and neither internal, experimental, deprecated nor scheduled for removal on any of them. On all of them, `FileUtil.delete(Path)` and `NioFiles.deleteRecursively(Path)` have the same body, `FileUtilRt.deleteRecursively(path, null)`: the deletion is the same, recursive, and does nothing for a path that doesn't exist. `DownloadTaskArchiveRootTest` gets a test that `stripRootFolder` replaces the server file and a folder of an earlier install, the folder's files and folders included, instead of merging the new folder into the old one. Without the deletion, the install fails, as the move finds the file in place. Part of redhat-developer#1971
…nguage servers of IntelliJ's settings The plugin verifier reports `PluginDescriptor.getClassLoader()` as deprecated on 2026.1 and later (and experimental on all the supported versions), from `JetBrainsLanguageServers.getClassLoaderOfPage`, which loads the settings service of IntelliJ's Language Servers page for the warning of a file that both clients serve (redhat-developer#2077). It now does as redhat-developer#2040 did in `ServerExtensionPointBean` and `DebugAdapterServerExtensionPointBean`: `getPluginClassLoader()`, or else the class loader of the descriptor's class, which is what the default `getClassLoader()` returns on all the supported versions. `getPluginClassLoader()` is public on 2024.2 to 2026.3, and neither internal, experimental, deprecated nor scheduled for removal on any of them. `JetBrainsLanguageServersTest.testTheServersAreReadThroughTheSettingsPage` covers it: with no class loader for the page, it fails. Part of redhat-developer#1971
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2277 +/- ##
==========================================
+ Coverage 58.05% 58.06% +0.01%
==========================================
Files 848 848
Lines 36436 36438 +2
Branches 5717 5717
==========================================
+ Hits 21152 21159 +7
+ Misses 12295 12288 -7
- Partials 2989 2991 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
@coderabbitai review |
Action performed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1971
What
A follow-up to #2276, for the warnings that remain in the plugin verifier's report: the one usage of an API scheduled for removal, and a deprecated API that #2040 had already replaced elsewhere. One commit per API, to be rebase-merged:
FileUtil.delete(Path): scheduled for removal and deprecated from 2025.2DownloadTask.moveContentIntoNioFiles.deleteRecursively(Path)PluginDescriptor.getClassLoader(): deprecated from 2026.1, experimental on allJetBrainsLanguageServers.getClassLoaderOfPagegetPluginClassLoader(), or else the descriptor's class loader, as #2040 didI checked both replacements with
javapon the jars of the 8 IDEs that main's CI verifies (2024.2 to 2026.3 EAP). Both are public on all 8, and none of them marks either one internal, experimental, deprecated or scheduled for removal.NioFiles.deleteRecursively(Path)has the same body asFileUtil.delete(Path)on all 8:FileUtilRt.deleteRecursively(path, null). So the deletion stays the same: recursive, and a no-op for a path that doesn't exist.getPluginClassLoader()is abstract inPluginDescriptoron all 8.requireNonNullElse(getPluginClassLoader(), getClass().getClassLoader())is exactly what the defaultgetClassLoader()returns. The comment and the pattern are those ofServerExtensionPointBeanandDebugAdapterServerExtensionPointBean.Not changed: the
InlayProviderSettingsModel.getMainCheckBoxLabel()override inLSPInlayHintsSettingsProvider(#1800). It isabstracton all 8 IDEs, so the override must stay. It's deprecated on all 8 with the message "Not used in new UI", with no replacement and level WARNING. Nothing in LSP4IJ reads it. The verifier will keep reporting "Deprecated method ... is overridden" until the platform makes it non-abstract or drops it.Plugin verifier
./gradlew verifyPluginover the 8 IDEs that main's CI verifies, locally. These are the counts of the summary line, as in the CI log, written scheduled-for-removal / deprecated / experimental / internal. "Before" is main 01b5528; CI run 45794351150 gives the same counts.FileUtil.delete(Path).getClassLoader(). From 2025.2,FileUtil.delete(Path)was counted as scheduled for removal rather than as deprecated.getClassLoader().Tests
DownloadTaskArchiveRootTest.testStripRootFolderReplacesTheFileAndTheFolderOfAnEarlierInstall.stripRootFolderreplaces the server file and alib/folder that an earlier install left. The folder's stale file and nested folder are deleted, not merged with the new folder.moveContentInto, the new test fails: the install fails, as the move finds the server file in place.JetBrainsLanguageServersTest.testTheServersAreReadThroughTheSettingsPagefails: it reads no servers.installation.*,JetBrainsLanguageServersTest,JetBrainsLanguageServerEditorNotificationProviderTestandfeatures.inlayhint.*. No test coversLSPInlayHintsSettingsProvider, which is unchanged.Behaviour change
None: the deletion and the class loader are the same as before.