Skip to content

Commit 87edf99

Browse files
authored
Improve error message in JDK 17+ when concurrent modifications to SDK client builders cause a null value to be read. (#5295)
1 parent ecd78da commit 87edf99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils/src/main/java/software/amazon/awssdk/utils/AttributeMap.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ private <T> T internalGet(Value<?> requester, Key<T> key) {
393393
* Resolve the provided value, making sure to record any of its dependencies in the dependency graph.
394394
*/
395395
private <T> T resolveValue(Value<T> value) {
396+
Validate.notNull(value,
397+
"Encountered a null value when resolving configuration attributes. This is commonly "
398+
+ "caused by concurrent modifications to non-thread-safe types. Ensure you're "
399+
+ "synchronizing access to all non-thread-safe types.");
396400
return value.get(new LazyValueSource() {
397401
@Override
398402
public <U> U get(Key<U> innerKey) {

0 commit comments

Comments
 (0)