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

JAVACLIENT-224: Fix ConcurrentModificationException on object creatio… #105

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;
import java.util.stream.Stream;
Expand Down Expand Up @@ -64,9 +64,9 @@ public AbstractBase() {
// retrofit builder
retrofitBuilder = new Retrofit.Builder();
// header interceptors
headerInterceptors = new HashMap<>();
headerInterceptors = new ConcurrentHashMap<>();
// header values
headerValues = new HashMap<>();
headerValues = new ConcurrentHashMap<>();
}

protected AbstractBase(AbstractBase<?> base) {
Expand Down Expand Up @@ -318,10 +318,10 @@ protected final void replaceWith(AbstractBase<?> base) {
// retrofit builder
retrofitBuilder = retrofit.newBuilder();
// copy header interceptors
headerInterceptors = new HashMap<>();
headerInterceptors = new ConcurrentHashMap<>();
headerInterceptors.putAll(base.headerInterceptors);
// copy header values
headerValues = new HashMap<>();
headerValues = new ConcurrentHashMap<>();
headerValues.putAll(base.headerValues);
}

Expand Down