Repository navigation
platform: cleanup redundant casts - #9824
Conversation
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:
|
Hey @mbien & @matthiasblaesing , do I need a review for something as simple as this? |
|
yes we should review cleanup PRs. my first small request is the same as mentioned on other PRs already: If possible, PR title and commit should inform about the scope of the cleanup to avoid having N titles saying the exact same. This appears to focus on the platform cluster, if this is correct please mention it in the title + first line of the commit. Something like "platform: cleanup redundant casts" would be perfect. |
Done.. And this makes sense as it aligns w/ how I do things in my professional life. Thanks for the eyes on this! |
|
thanks! the commit title too if possible. I updated the labels to "platform" so that the platform tests run next time its updated. |
Formally we work in CTR (commit-then-review) mode. So strictly speaking you can merge without review, but then the commit might need to be backed out later (when the review part is invoked). I make use of this mode to get things in at some point. Practically I think there is an informal agreement to give people time to review and and if noone speaks up in a sane timeframe potentially merge without review if noone steps up to look at the change. |
matthiasblaesing
left a comment
There was a problem hiding this comment.
Eyeballed this and looks sane to me. You might want to reformat the changed locations as there were multiple occurrences of multiple spaces.
|
Thanks for the feedback about the commit "procedures". I wanted to ask as I was hoping to keep the resource demand at a minimum. Especially for something as simple as this. |
platform: 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: