From 176de93abca265c138b9a39892c837e4a189ff0d Mon Sep 17 00:00:00 2001 From: davigonz Date: Tue, 6 Aug 2019 16:44:13 +0200 Subject: [PATCH] Fix concurrent exception that appears from time to time --- .../android/lib/common/http/interceptors/HttpInterceptor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/interceptors/HttpInterceptor.java b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/interceptors/HttpInterceptor.java index 3c9b61e7..b9720924 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/interceptors/HttpInterceptor.java +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/interceptors/HttpInterceptor.java @@ -30,7 +30,7 @@ import okhttp3.Response; import java.io.IOException; import java.util.ArrayList; -import java.util.Iterator; +import java.util.ListIterator; /** * Http interceptor to use multiple interceptors in the same {@link okhttp3.OkHttpClient} instance @@ -86,7 +86,7 @@ public class HttpInterceptor implements Interceptor { } public void deleteRequestHeaderInterceptor(String headerName) { - Iterator requestInterceptorIterator = mRequestInterceptors.iterator(); + ListIterator requestInterceptorIterator = mRequestInterceptors.listIterator(); while (requestInterceptorIterator.hasNext()) { RequestInterceptor currentRequestInterceptor = requestInterceptorIterator.next(); if (currentRequestInterceptor instanceof RequestHeaderInterceptor &&