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

Improve error message in JDK 17+ when concurrent modifications to SDK client builders cause a null value to be read. #5295

Merged
merged 7 commits into from
Jul 17, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@ private <T> T internalGet(Value<?> requester, Key<T> key) {
* Resolve the provided value, making sure to record any of its dependencies in the dependency graph.
*/
private <T> T resolveValue(Value<T> value) {
Validate.notNull(value,
"Encountered a null value when resolving configuration attributes. This is commonly "
+ "caused by concurrent modifications to non-thread-safe types. Ensure you're "
+ "synchronizing access to all non-thread-safe types.");
return value.get(new LazyValueSource() {
@Override
public <U> U get(Key<U> innerKey) {
Expand Down
Loading