mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Optimization
This commit is contained in:
parent
b7a7ef383b
commit
80f69c2240
1 changed files with 3 additions and 4 deletions
|
@ -219,6 +219,7 @@ public class DnsHelper {
|
|||
SRVRecord srv = (SRVRecord) record;
|
||||
result.add(new DnsRecord(srv.getTarget().toString(true), srv.getPort(), srv.getPriority(), srv.getWeight()));
|
||||
} else if (record instanceof TXTRecord) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
TXTRecord txt = (TXTRecord) record;
|
||||
for (Object content : txt.getStrings()) {
|
||||
String text = content.toString();
|
||||
|
@ -236,11 +237,9 @@ public class DnsHelper {
|
|||
i += 4;
|
||||
slash = text.indexOf('\\', i);
|
||||
}
|
||||
if (result.size() > 0)
|
||||
result.get(0).response += text;
|
||||
else
|
||||
result.add(new DnsRecord(text, 0));
|
||||
sb.append(text);
|
||||
}
|
||||
result.add(new DnsRecord(sb.toString(), 0));
|
||||
} else if (record instanceof ARecord) {
|
||||
ARecord a = (ARecord) record;
|
||||
result.add(new DnsRecord(a.getAddress().getHostAddress()));
|
||||
|
|
Loading…
Reference in a new issue