Skip to content
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 incorrect unused coloring #5551 #5670

Merged
merged 1 commit into from
Mar 18, 2023

Conversation

junichi11
Copy link
Member

When there is an anonymous class in a method body, the anonymous class also removes method blocks of the enclosing class that need to be scanned. So, to prevent that, use Map<TypeInfo, List<Block>> instead of List<Block>

Before:

nb-php-gh-5551-before

After:

nb-php-gh-5551-after

@junichi11 junichi11 added the PHP [ci] enable extra PHP tests (php/php.editor) label Mar 17, 2023
@junichi11 junichi11 added this to the NB18 milestone Mar 17, 2023
@junichi11 junichi11 requested a review from tmysik March 17, 2023 05:17
@junichi11
Copy link
Member Author

@tmysik Could you please have a look at this? If there is no problem, let's merge it. Thanks!

@tmysik
Copy link
Member

tmysik commented Mar 17, 2023

@junichi11 Please, see my comment about the list implementation (I am OK with the current one), let me know. Then, I will merge it. Thanks!

@junichi11 junichi11 force-pushed the php-gh-5551-incorrect-unused branch from 5d3d419 to 297f445 Compare March 17, 2023 21:46
When there is an anonymous class in a method body, the anonymous class also removes method blocks of the enclosing class that need to be scanned.
So, to prevent that, use `Map<TypeInfo, List<Block>>` instead of `List<Block>`
@junichi11 junichi11 force-pushed the php-gh-5551-incorrect-unused branch from 297f445 to 3cc64b4 Compare March 17, 2023 22:18
@apache apache locked and limited conversation to collaborators Mar 17, 2023
@apache apache unlocked this conversation Mar 17, 2023
@junichi11
Copy link
Member Author

CI: Some checks were not successful

I canceled jobs once because the CI status was not shown. I re-ran all jobs again.
"NetBeans / Build cancelled (pull_request) — Run manually canceled" : maybe, no problem? (@mbien)

@mbien
Copy link
Member

mbien commented Mar 18, 2023

@junichi11 looks good to me, PHP is green, everything else too. Only the cleanup job doesn't want to cleanup - all good.

@junichi11
Copy link
Member Author

@mbien Thank you!

@tmysik tmysik merged commit 137b765 into apache:master Mar 18, 2023
@junichi11
Copy link
Member Author

@tmysik Thank you, Tomas!!

@junichi11 junichi11 deleted the php-gh-5551-incorrect-unused branch March 18, 2023 10:23
@tmysik
Copy link
Member

tmysik commented Mar 18, 2023

@junichi11 You are welcome, of course!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Anonymous classes cause unexpected notice about unused private functions although they are actually used
3 participants