[#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 f88cd62354
commit e09d2f32fb

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());
}