fix: guard AnsiConsole.providers() call to avoid NoSuchMethodError (fixes #1766)#1767
fix: guard AnsiConsole.providers() call to avoid NoSuchMethodError (fixes #1766)#1767
Conversation
…ixes #1766) Only call TerminalBuilder.providers() when the jansi.providers system property is actually set. Passing null was a no-op anyway, and the unconditional call causes NoSuchMethodError when an older jline-terminal jar without the providers() method is loaded first on the classpath.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|



Summary
TerminalBuilder.providers()call inAnsiConsole.doInstall()with a null check on thejansi.providerssystem propertyNoSuchMethodErrorwhen an olderjline-terminaljar (without theproviders()method) is loaded first on the classpath.providers(null)was a no-op anyway since the field defaults to nullFixes #1766
Summary by CodeRabbit