File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
core/src/main/java/io/snabble/sdk Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 11# Changelog
22All notable changes to this project will be documented in this file.
33
4+ ## [ 0.44.2]
5+
6+ ### Fixed
7+ - Removed usage of removeIf, to support API < 26 without using coreLibraryDesugaring
8+
49## [ 0.44.1]
510
611### Added
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ allprojects {
3131 }
3232
3333 project. ext {
34- sdkVersion= ' 0.44.1 '
34+ sdkVersion= ' 0.44.2 '
3535 versionCode= 1
3636
3737 compileSdkVersion= 30
Original file line number Diff line number Diff line change 1717import java .util .Collections ;
1818import java .util .Currency ;
1919import java .util .HashMap ;
20+ import java .util .Iterator ;
2021import java .util .List ;
2122import java .util .Locale ;
2223import java .util .Map ;
24+ import java .util .Objects ;
2325import java .util .Set ;
2426import java .util .concurrent .CopyOnWriteArrayList ;
2527import java .util .function .Predicate ;
@@ -212,9 +214,13 @@ void parse(JsonObject jsonObject) {
212214 if (descriptors != null ) {
213215 Type t = new TypeToken <List <PaymentMethodDescriptor >>() {}.getType ();
214216 List <PaymentMethodDescriptor > paymentMethodDescriptors = GsonHolder .get ().fromJson (descriptors , t );
215- paymentMethodDescriptors .removeIf (paymentMethodDescriptor ->
216- PaymentMethod .fromString (paymentMethodDescriptor .getId ()) == null );
217- this .paymentMethodDescriptors = Collections .unmodifiableList (paymentMethodDescriptors );
217+ ArrayList <PaymentMethodDescriptor > filteredDescriptors = new ArrayList <>();
218+ for (PaymentMethodDescriptor descriptor : paymentMethodDescriptors ) {
219+ if (PaymentMethod .fromString (descriptor .getId ()) != null ) {
220+ filteredDescriptors .add (descriptor );
221+ }
222+ }
223+ this .paymentMethodDescriptors = Collections .unmodifiableList (filteredDescriptors );
218224 } else {
219225 this .paymentMethodDescriptors = Collections .unmodifiableList (Collections .emptyList ());
220226 }
You can’t perform that action at this time.
0 commit comments