-
Notifications
You must be signed in to change notification settings - Fork 865
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
Do not remove the just-added annotation from the list of annotations. #8201
base: master
Are you sure you want to change the base?
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.
Thank you for the PHP fix.
I fixed |
@lahodaj please, see the bug above (see the screenshot). thank you |
Example to reproduce it with PHP:
|
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.
It works. Thank you very much!
regarding #8201 (comment) just to be sure: is NB26 correct or is this meant for NB25/delivery? If the target is changed, this would need to be rebased too, since the branch is post spec version bump to avoid it creating a huge merge commit. + tests need to run again and according to our rules it would need one new approval. Its all doable - but someone would have to decide what to do ;) |
I apologize for belated comment, I planned to do this sooner. If the original patch would have worked, I would have been tempted to push it to NB25. But the current patch could probably use some baking time, so I'd prefer NB 26. Unless PHP needs the fix, but I suspect it is OK with the current workaround. My understanding is that #8196 is not yet in master - I'll wait for that, rebase, and if all goes well, I'll merge this PR to master. |
And thanks for the testing! |
Here:
#8142 (comment)
was a note that
TestMethodController.setTestMethods
must first be called with an empty list, and only then with the real values. Looking at the code, the issue is that first the new annotations are added, and then the old ones are removed. And when one annotation replaces another on the same line, the removal will remove registration of the newly-added annotation in theannotationLines
/TestMethodAnnotation.DOCUMENT_ANNOTATION_LINES_KEY
map.This was not obvious for Java, as Java support runs several providers, and calls
setTestMethods
after running each provider (passing cumulative results into the method). As a consequence, in many cases, thesetTestMethods
was first called with an empty list, effectively replicating the PHP workaround.The proposal here is to:
setTestMethods
only once