-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix unused variables warnings at java #26433
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
CI failed on
Rebasing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @AlexeyBarabash for the changes. |
2a7eae5
to
696947d
Compare
[puLL-Merge] - brave/brave-core@26433 Here's my review of the changes: DescriptionThis pull request makes a series of minor code cleanup changes across multiple files in the Brave Android codebase. The changes primarily focus on removing unused variables, imports, and methods, as well as addressing some minor code style issues. ChangesChanges
|
…va compiler. Must be reverted when the proper fix will reach cr132 from master. Related PR to master: #26433 Chromium change: https://source.chromium.org/chromium/chromium/src/+/ce29c6390da3befff7b16ae789b49410e15f1754 Android: Enable Error Prone's UnusedVariable warning for non-test code All violations have been fixed, so turning it on! Note that this catches unused variables only in *private* code, so it should not hinder our ability to do cross-repo patches. If a new violation lands at the same time as this CL, please consider fixing / suppressing it rather than reverting this CL. To suppress, either: 1) add @SuppressWarnings("UnusedVariable") on the class or method, or 2) prefix variables with "unused_" Bug: 372458640, 40661145 Change-Id: Ie9fbd1b34632dcc99bfbba4496bb1ec2b72e238f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5935057
Released in v1.75.4 |
…va compiler. Must be reverted when the proper fix will reach cr132 from master. Related PR to master: #26433 Chromium change: https://source.chromium.org/chromium/chromium/src/+/ce29c6390da3befff7b16ae789b49410e15f1754 Android: Enable Error Prone's UnusedVariable warning for non-test code All violations have been fixed, so turning it on! Note that this catches unused variables only in *private* code, so it should not hinder our ability to do cross-repo patches. If a new violation lands at the same time as this CL, please consider fixing / suppressing it rather than reverting this CL. To suppress, either: 1) add @SuppressWarnings("UnusedVariable") on the class or method, or 2) prefix variables with "unused_" Bug: 372458640, 40661145 Change-Id: Ie9fbd1b34632dcc99bfbba4496bb1ec2b72e238f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5935057
This PR fixes all
UnusedVariable
errors for Brave Java files.We need it to be prepared for upcoming
cr132
, where this error type is enabled for all non-test code: https://source.chromium.org/chromium/chromium/src/+/ce29c6390da3befff7b16ae789b49410e15f1754 .To create this PR I commented out
'UnusedVariable'
atsrc/build/android/gyp/compile_java.py:102
and fixed all errors for Brave java files.Resolves brave/brave-browser#42153
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
N/A, CI should succeed.