-
Notifications
You must be signed in to change notification settings - Fork 864
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
Fixed a bug in AttributeMap, which causes a ConcurrentModificationException… #5559
Conversation
@@ -319,6 +319,7 @@ private void internalPut(Key<?> key, Value<?> value) { | |||
if (oldValue != null) { | |||
dependencyGraph.valueUpdated(oldValue, value); | |||
} | |||
|
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.
nit : unintentional ?
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.
Fixed!
dependencyGraph.valueUpdated(v, newValue); | ||
} | ||
return newValue; | ||
Value<?> currentValue = attributes.get(key); |
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.
Looks good. Is there any way in which we tested this ? If a unit test is difficult, A one-time runnable test that validates these changes would be helpful here. Lmk if its non-trivial to test / validate
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.
This new behavior is exercised in #5562. Let me see if I can create a standalone test for it, for the purposes of this PR.
…eption when lazy properties depend on lazy properties that depend on any other property. This is achieved by changing a `compute` into a `get` followed by a `put`.
66c9e85
to
9ed97a3
Compare
Quality Gate passedIssues Measures |
… when lazy properties depend on lazy properties that depend on any other property.
This is achieved by changing a
compute
into aget
followed by aput
.This code path was not hit before the endpoint URL changes, which are forthcoming. Those changes also add a path that tests this change.