[#2708] DnsResource.duplicate() should return DnsResource and not ByteBufHolder

Motivation:

DnsResource.duplicate() should return DnsResource and not ByteBufHolder

Modifications:

Change return type from ByteBufHolder to DnsResource

Result:

No need to cast to the correct type when using duplicate()
This commit is contained in:
Norman Maurer 2014-07-28 04:24:26 -07:00
parent 2131edadf2
commit 88c8a4f393

View File

@ -74,7 +74,7 @@ public final class DnsResource extends DnsEntry implements ByteBufHolder {
* Returns a duplicate of this resource record.
*/
@Override
public ByteBufHolder duplicate() {
public DnsResource duplicate() {
return new DnsResource(name(), type(), dnsClass(), ttl, content.duplicate());
}