Remove compareTo() from DelegationSignerData

The only reason why it existed was so that we could get tests to print information in a consistent order and there are other ways of doing that. By removing compareTo we can use the properties of the extended ImmutableObject properly and properly implement the RFC https://tools.ietf.org/html/rfc5910#page-18

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240170488
This commit is contained in:
gbrodman
2019-03-29 15:56:15 -04:00
committed by jianglai
parent 625181ee3d
commit f95a30426d
5 changed files with 136 additions and 50 deletions
@@ -30,8 +30,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
*/
@Embed
@XmlType(name = "dsData")
public class DelegationSignerData
extends ImmutableObject implements Comparable<DelegationSignerData> {
public class DelegationSignerData extends ImmutableObject {
/** The identifier for this particular key in the domain. */
int keyTag;
@@ -85,11 +84,6 @@ public class DelegationSignerData
return instance;
}
@Override
public int compareTo(DelegationSignerData other) {
return Integer.compare(getKeyTag(), other.getKeyTag());
}
/**
* Returns the presentation format of this DS record.
*