KEMBAR78
PostPolicyV4 classes could be improved · Issue #440 · googleapis/java-storage · GitHub
Skip to content

PostPolicyV4 classes could be improved #440

@dmitry-fa

Description

@dmitry-fa

Classes defined in PostPolictyV4.java are not as perfect as they can be.
Enhancements and bugs are listed below:

class PostPolicyV4

  • the class description is stingy, need to put more words and point to usage example
  • public methods miss Javadoc
  • no verification for given URL string is a valid URL
  • BUG: getFields() returns the map as is, so one can modify PostPolicyV4 objects after creation
    (suggested fix: make fields immutable)

class PostPolicyV4.PostFieldsV4

  • BUG: public method getFieldsMap() returns map that allows to alter PostFieldsV4 instances without Builder (no control)
    (suggested fix: deprecate method getFieldsMap(), make the map immutable, define getters)

class PostPolicyV4.PostConditionsV4

  • BUG getConditions() returns mutable Set
  • BUG getConditions() exposes non public class PostPolicyV4.ConditionV4
    (suggested fix: make PostPolicyV4.ConditionV4 public, make conditions immutable)

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions