Skip to content

Commit

Permalink
Fix type inference w/ JDK8
Browse files Browse the repository at this point in the history
Motivation:

Compile crash w/ JDK8:

```
[ERROR]
/Users/slandelle/Documents/dev/workspaces/workspace-ahc2/async-http-clie
nt-project/netty-bp/codec-dns/src/main/java/io/netty/handler/codec/dns/D
nsMessageUtil.java:[176,16] reference to append is ambiguous
  both method append(java.lang.String) in java.lang.StringBuilder and
method append(java.lang.StringBuffer) in java.lang.StringBuilder match
```

Modification:

Force type explicitly

Result:

Class compile w/ JDK8
  • Loading branch information
slandelle authored and normanmaurer committed Mar 23, 2016
1 parent d6bf388 commit 3d11534
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private static void appendRecords(StringBuilder buf, DnsMessage message, DnsSect
for (int i = 0; i < count; i ++) {
buf.append(StringUtil.NEWLINE)
.append(StringUtil.TAB)
.append(message.recordAt(section, i));
.append(message.<DnsRecord>recordAt(section, i));
}
}

Expand Down

0 comments on commit 3d11534

Please sign in to comment.