From 41ef467cdcfbfb602c156ed26c19732b88c55d3c Mon Sep 17 00:00:00 2001 From: Antoine LCDP Date: Fri, 26 Jul 2024 13:07:43 +0200 Subject: [PATCH] #336 : Add unserscore in ID pattern matcher to allow new ID format from mangopay and cast to the correct class --- .../mangopay/core/APIs/implementation/IdempotencyApiImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/mangopay/core/APIs/implementation/IdempotencyApiImpl.java b/src/main/java/com/mangopay/core/APIs/implementation/IdempotencyApiImpl.java index f4f2fc14..66f402e1 100644 --- a/src/main/java/com/mangopay/core/APIs/implementation/IdempotencyApiImpl.java +++ b/src/main/java/com/mangopay/core/APIs/implementation/IdempotencyApiImpl.java @@ -46,7 +46,7 @@ private void instantiateResourceObject(IdempotencyResponse response) throws Exce //Class value = entry.getValue(); String sourceUrl = super.getRequestUrl(entry.getKey()); - sourceUrl = String.format(sourceUrl, "[0-9a-zA-Z]+", "[0-9a-zA-Z]+"); + sourceUrl = String.format(sourceUrl, "[0-9a-zA-Z_]+", "[0-9a-zA-Z_]+"); sourceUrl = sourceUrl.replace("/", "\\/"); Pattern ex = Pattern.compile(sourceUrl);