Skip to content

Commit 975671d

Browse files
committed
fix when metadata contains no payment methods
1 parent 68a0f41 commit 975671d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/java/io/snabble/sdk/Project.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ void parse(JsonObject jsonObject) {
215215
paymentMethodDescriptors.removeIf(paymentMethodDescriptor ->
216216
PaymentMethod.fromString(paymentMethodDescriptor.getId()) == null);
217217
this.paymentMethodDescriptors = Collections.unmodifiableList(paymentMethodDescriptors);
218+
} else {
219+
this.paymentMethodDescriptors = Collections.unmodifiableList(Collections.emptyList());
218220
}
219221

220222
parseShops(jsonObject);

0 commit comments

Comments
 (0)