Skip to content

Conversation

YomesInc
Copy link
Contributor

No description provided.


import com.cloudinary.utils.StringUtils;

public class RadiusOption {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class can be a private (or at most package-private) method in Transformation.

return StringUtils.join(normalizeRadiusOptions(radiusOption), ":");
}

private static Object[] normalizeRadiusOptions(Object[] radiusOptions) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As most transformation params support explicit string, we (mostly) don't do a lot of validations.
Furthermore - if there is a bad input, we can't just replace it with zeroes.

We should only validate that there are no nulls before calling StringUtils.join(), and remove normalizeRadiusOptions method.

@nitzanj nitzanj merged commit 6a7fa23 into master Jun 9, 2020
@patrick-tolosa patrick-tolosa deleted the feature/add-different-radius-transformation-support branch May 23, 2021 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants