Skip to content

fix: Remove deprecation warnings introduced by the Java 11 migration - #41

Merged
bobbylight merged 1 commit into
masterfrom
fix-java-11-deprecation-warnings
Oct 4, 2026
Merged

bobbylight merged 1 commit into
masterfrom
fix-java-11-deprecation-warnings

Conversation

@bobbylight

Copy link
Copy Markdown
Owner

Summary

Cleans up the 16 javac deprecation warnings that appeared when the project moved to Java 11.

Details

Replaces deprecated AWT input APIs with their non-deprecated equivalents:

  • Toolkit.getMenuShortcutKeyMask() → getMenuShortcutKeyMaskEx()
  • InputEvent.{SHIFT,CTRL,META}_MASK → *_DOWN_MASK
  • KeyEvent.getModifiers() → getModifiersEx() in FindToolBar's key listener
  • FindToolBar's JButton ActionEvent modifier check now uses ActionEvent.CTRL_MASK|SHIFT_MASK, which are not deprecated and have the same values as the old InputEvent masks

KeyStroke.getKeyStroke(int, int) accepts both the old and extended modifier masks, so keyboard shortcuts are unchanged.

Test plan

./gradlew clean build passes with no javac warnings. Manually verify in the demo app (./gradlew RSTAUIDemo:run):

  • Ctrl/Cmd+F focuses the search field in the Find and Replace dialogs
  • Shift+Enter and Ctrl/Cmd+Enter in the dialogs search backward
  • In the Find toolbar, Enter searches forward and Shift+Enter / Ctrl+Enter searches backward
  • Ctrl/Cmd+Shift+F and Ctrl/Cmd+Shift+H show the toolbars, and Ctrl/Cmd+L opens Go To Line

🤖 Generated with Claude Code

@codecov-commenter

codecov-commenter commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.85%. Comparing base (962ccba) to head (7ae53e0).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...main/java/org/fife/rsta/ui/search/FindToolBar.java 50.00% 2 Missing ⚠️
...fife/rsta/ui/search/AbstractFindReplaceDialog.java 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master      #41   +/-   ##
=========================================
  Coverage     80.85%   80.85%           
  Complexity      357      357           
=========================================
  Files            22       22           
  Lines          1964     1964           
  Branches        193      193           
=========================================
  Hits           1588     1588           
  Misses          298      298           
  Partials         78       78           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bobbylight
bobbylight force-pushed the fix-java-11-deprecation-warnings branch from ab87bc2 to 8e68f2a Compare October 4, 2026 22:58
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bobbylight
bobbylight force-pushed the fix-java-11-deprecation-warnings branch from 8e68f2a to 7ae53e0 Compare October 4, 2026 23:03
@bobbylight bobbylight self-assigned this Oct 4, 2026
@bobbylight bobbylight added this to the 4.0.0 milestone Oct 4, 2026
@bobbylight
bobbylight marked this pull request as ready for review October 4, 2026 23:05
@bobbylight
bobbylight merged commit 6c7e624 into master Oct 4, 2026
3 checks passed
@bobbylight
bobbylight deleted the fix-java-11-deprecation-warnings branch October 4, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants