-
Notifications
You must be signed in to change notification settings - Fork 129
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 setting properties with group assignment #523
Fix setting properties with group assignment #523
Conversation
Codecov Report
@@ Coverage Diff @@
## master #523 +/- ##
============================================
+ Coverage 98.69% 98.73% +0.04%
Complexity 1759 1759
============================================
Files 66 66
Lines 4279 4279
============================================
+ Hits 4223 4225 +2
+ Misses 56 54 -2
Continue to review full report at Codecov.
|
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.
Thanks a lot for your contribution!
Can I ask you to add a unit test for this case? 👍
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.
Code looks reasonable. Just needs unit test(s) so this does not get broken again in future.
Hello, I added a test case. |
Hello, I added the requested test. Is there still a problem? |
f5688f4
to
31c9187
Compare
With the new test case on
That's good, the test fails. And passes with the fix. |
Setting properties that are part of a group is broken since version 4.0.0. The
Component::remove()
method for the specific case of a property given by its name (as string) that includes a group prefix will throw an exception. However, I believe the exception is only intended for the usage of this function where the property to remove is given as an object reference, not as a string, where the given property/component is not a child of component the remove() method is called on.Example code to trigger the exception:
The exception will be triggered for both the usage in the constructor as well as by a separate set operation.