Skip to content

Cleanup redundant casts. - #9824

Open
BradWalker wants to merge 1 commit into
apache:masterfrom
BradWalker:cleanup_redundant_cast
Open

BradWalker wants to merge 1 commit into
apache:masterfrom
BradWalker:cleanup_redundant_cast

Conversation

@BradWalker

Copy link
Copy Markdown
Member

Cleanup redundant casts.

As a result of cleaning up many of the warnings, a bunch of redundant cast crops up. It's time to reduce many of the warnings. This code review fixes the redundant warnings in the platform code.

For example,

[repeat] /home/bwalker/src/netbeans/platform/options.api/src/org/netbeans/modules/options/Utils.java:38: warning: [cast] redundant cast to FileObject
[repeat] FileObject r = (FileObject) filesCache.get (name + '.' + ext);
[repeat] ^ [repeat] /home/bwalker/src/netbeans/platform/options.api/src/org/netbeans/modules/options/Utils.java:38: warning:

As a result of cleaning up many of the warnings, a bunch of redundant cast crops up. It's time to reduce many of the warnings.
This code review fixes the redundant warnings in the platform code.

For example,

   [repeat] /home/bwalker/src/netbeans/platform/options.api/src/org/netbeans/modules/options/Utils.java:38: warning: [cast] redundant cast to FileObject
   [repeat]         FileObject r = (FileObject) filesCache.get (name + '.' + ext);
   [repeat]                        ^   [repeat] /home/bwalker/src/netbeans/platform/options.api/src/org/netbeans/modules/options/Utils.java:38: warning:
@BradWalker BradWalker added this to the NB33 milestone Nov 23, 2026
@BradWalker BradWalker self-assigned this Nov 23, 2026
@BradWalker BradWalker added Code cleanup Label for cleanup done on the Netbeans IDE Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) labels Nov 23, 2026
@BradWalker

Copy link
Copy Markdown
Member Author

Hey @mbien & @matthiasblaesing , do I need a review for something as simple as this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code cleanup Label for cleanup done on the Netbeans IDE Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant