Modernize Java idioms, fix NPEs, clean up redundancies#17
Merged
Conversation
…cated header, log errors, extract duplicate code Co-authored-by: unknowIfGuestInDream <57802425+unknowIfGuestInDream@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Optimize and fix issues in project code
Modernize Java idioms, fix NPEs, clean up redundancies
Feb 28, 2026
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.
Code quality pass across the plugin: fix potential null dereferences, replace pre-generics patterns with modern Java, and remove dead/duplicate code.
Bug fixes
FullScreenActionDelegate.execute()/EscActionDelegate.execute()—Display.getDefault().getActiveShell()can returnnull; added null guards to prevent NPECode modernization (Activator.java)
forloops → enhanced for-each(Control)/(Menu)casts on already-typed generics removedIPropertyChangeListenerandRunnable→ lambdaspreferences()Duplicate code elimination (FullscreenHandlerService)
getFullscreenCommand()helper; command ID → constant@SuppressWarnings("restriction")moved to class level (both methods use internal API)(ICommandService)castError handling (FullScreenPreferencePage)
catch (IOException e) {}→ logs viaActivator.getDefault().getLog()Manifest cleanup
Eclipse-LazyStart: true(redundant with existingBundle-ActivationPolicy: lazy)🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.