[Fineract-309] query result list assigned as a modifiable list

This commit is contained in:
Adi Narayana Raju
2017-01-02 12:43:10 +05:30
parent 9a6b5d1c12
commit f55a16755f
@@ -135,7 +135,7 @@ public class ProductMixWritePlatformServiceJpaRepositoryImpl implements ProductM
this.fromApiJsonDeserializer.validateForUpdate(command.json());
final Map<String, Object> changes = new LinkedHashMap<>();
final List<ProductMix> existedProductMixes = this.productMixRepository.findByProductId(productId);
final List<ProductMix> existedProductMixes = new ArrayList<>(this.productMixRepository.findByProductId(productId));
if (CollectionUtils.isEmpty(existedProductMixes)) { throw new ProductMixNotFoundException(productId); }
final Set<String> restrictedIds = new HashSet<>(Arrays.asList(command.arrayValueOfParameterNamed("restrictedProducts")));