Netflix / denominator

Portably control DNS clouds using java or bash
Apache License 2.0
580 stars 110 forks source link

remove map from known types except rdata #236

Closed codefromthecrypt closed 11 years ago

codefromthecrypt commented 11 years ago

Extending map leads to either complicated eq/hashCode or potential for masking fields. This was caught downstream where the "geo" field in ResourceRecordSet was masked by an identical key in the map. Most predictable solution is to not extend map on statically defined types.

The only exception is rdata. rdata is wide open and we only have java classes for a small number of types. Until we enforce a supported subset, using Map to back rdata is still a valid compromise. That said, it implies the cost of test code to ensure map and java objects are equiv (entries == field values).

cloudbees-pull-request-builder commented 11 years ago

denominator-pull-requests #309 SUCCESS This pull request looks good