mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 08:27:14 +02:00
Remove leniency on poll message ID format without years in them
It's been long enough since the format change adding in years that all registrars should no longer have any IDs in the old format lying around that they're still attempting to ACK. All poll messages have already been coming back to registrars with the new format for months now. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=184714735
This commit is contained in:
parent
6280d74f1c
commit
29c38f3622
5 changed files with 40 additions and 42 deletions
|
@ -85,11 +85,9 @@ public class PollMessageExternalKeyConverter {
|
|||
*
|
||||
* @throws PollMessageExternalKeyParseException if the external key has an invalid format.
|
||||
*/
|
||||
// TODO(b/68953444): Make the year field mandatory once sufficient time has elapsed and backwards
|
||||
// compatibility is no longer necessary.
|
||||
public static Key<PollMessage> parsePollMessageExternalId(String externalKey) {
|
||||
List<String> idComponents = Splitter.on('-').splitToList(externalKey);
|
||||
if (idComponents.size() != 5 && idComponents.size() != 6) {
|
||||
if (idComponents.size() != 6) {
|
||||
throw new PollMessageExternalKeyParseException();
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue