-
Notifications
You must be signed in to change notification settings - Fork 169
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: Get boolean only if eventData has the key #13021
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.
Does it make sense to add a test in ElementListenersTest
for this change? Something like
AtomicInteger eventCount = new AtomicInteger();
DomListenerRegistration registration = ns.add("foo", e -> eventCount.incrementAndGet());
registration.setFilter("filterKey");
ns.fireEvent(createEvent("foo"));
Assert.assertEquals(0, eventCount.get());
JsonObject eventData = Json.createObject();
eventData.put("filterKey", true);
ns.fireEvent(new DomEvent(new Element("element"), "foo", eventData));
Assert.assertEquals(1, eventCount.get());
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
* Get boolean only if eventData has the key * Formatting * Add unit test
* Get boolean only if eventData has the key * Formatting * Add unit test
* Get boolean only if eventData has the key * Formatting * Add unit test
Hi @TatuLund and @mcollovati, when i performed cherry-pick to this commit to 2.7, i have encountered the following issue. Can you take a look and pick it manually? |
* Get boolean only if eventData has the key * Formatting * Add unit test Co-authored-by: Tatu Lund <[email protected]>
* Get boolean only if eventData has the key * Formatting * Add unit test Co-authored-by: Tatu Lund <[email protected]>
* Get boolean only if eventData has the key * Formatting * Add unit test Co-authored-by: Tatu Lund <[email protected]>
Fixes: #12198