cloudinary / cloudinary/cloudinary_java

`options` map modified directly

未关闭
#383 3 条评论 1 个 reaction 已指派 1 人 已指派给 @adimiz1 在 GitHub 查看
主要语言
Java
星标
175
派生
113
PR 合并指标
30 天内没有已合并 PR

描述

## Describe the bug in a sentence or two.
When passing in an immutable map to `Uploader.uploadLarge` it errors out because the method [tries to update](https://github.com/cloudinary/cloudinary_java/blob/master/cloudinary-core/src/main/java/com/cloudinary/Uploader.java#L147) the same instance that was passed in to it.
AFAICS, in most places a defensive copy is made from the `options` map, but not here. It caused issues for us as we are using the lib from Clojure interop, and by default, all the collections there are immutable.

## Issue Type (Can be multiple)
[ ] Build - Can’t install or import the SDK
[ ] Performance - Performance issues
[x] Behaviour - Functions aren’t working as expected (Such as generate URL)
[ ] Documentation - Inconsistency between the docs and behaviour
[ ] Other (Specify)

## Steps to reproduce
Use an immutable map as options for `Uploader.uploadLarge` when file is a `java.util.File`.

## Versions and Libraries (fill in the version numbers)
Cloudinary Java SDK version - 1.39.0

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。