[
https://issues.apache.org/jira/browse/FINERACT-2979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18129750#comment-18129750
]
Aarti Panchal commented on FINERACT-2979:
-----------------------------------------
PR: https://github.com/apache/fineract/pull/6709
> Updating a product mix fails with 501 Not Implemented
> -----------------------------------------------------
>
> Key: FINERACT-2979
> URL: https://issues.apache.org/jira/browse/FINERACT-2979
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Aarti Panchal
> Priority: Major
>
> PUT /loanproducts/\{productId}/productmix with restrictedProducts that keep a
> product that is already restricted returns 501 "Request was understood but
> not implemented".
> The server log shows java.lang.UnsupportedOperationException from
> ImmutableCollections.remove, thrown in
> ProductMixWritePlatformServiceJpaRepositoryImpl.updateRestrictedIds:
> updateProductMix passes Set.copyOf(restrictedProducts), which is immutable,
> and updateRestrictedIds removes the ids it keeps from that set. The exception
> is mapped to 501. This came in with the new command processing for product
> mix (FINERACT-2256), so editing a product mix fails in the web apps too.
> Fix: copy the ids into a mutable set (new HashSet<>(restrictedProducts)).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)