mirror of
https://github.com/google/nomulus.git
synced 2025-07-23 19:20:44 +02:00
Remove unnecessary if statements in CloudDnsWriter (#2071)
The condition they are guarding against cannot possibly occur.
This commit is contained in:
parent
fe19f0fe78
commit
8d22c2a8d8
1 changed files with 14 additions and 18 deletions
|
@ -144,7 +144,6 @@ public class CloudDnsWriter extends BaseDnsWriter {
|
|||
dsRrData.add(ds.toRrData());
|
||||
}
|
||||
|
||||
if (!dsRrData.isEmpty()) {
|
||||
domainRecords.add(
|
||||
new ResourceRecordSet()
|
||||
.setName(absoluteDomainName)
|
||||
|
@ -153,7 +152,6 @@ public class CloudDnsWriter extends BaseDnsWriter {
|
|||
.setKind("dns#resourceRecordSet")
|
||||
.setRrdatas(ImmutableList.copyOf(dsRrData)));
|
||||
}
|
||||
}
|
||||
|
||||
// Construct NS records (if any).
|
||||
Set<String> nameserverData = domain.get().loadNameserverHostNames();
|
||||
|
@ -169,7 +167,6 @@ public class CloudDnsWriter extends BaseDnsWriter {
|
|||
}
|
||||
}
|
||||
|
||||
if (!nsRrData.isEmpty()) {
|
||||
domainRecords.add(
|
||||
new ResourceRecordSet()
|
||||
.setName(absoluteDomainName)
|
||||
|
@ -178,7 +175,6 @@ public class CloudDnsWriter extends BaseDnsWriter {
|
|||
.setKind("dns#resourceRecordSet")
|
||||
.setRrdatas(ImmutableList.copyOf(nsRrData)));
|
||||
}
|
||||
}
|
||||
|
||||
desiredRecords.put(absoluteDomainName, domainRecords.build());
|
||||
logger.atFine().log(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue