Make warnings in Java code fatal (#28402)
This commit is contained in:
parent
58fa1e3604
commit
327e16980d
51 changed files with 480 additions and 213 deletions
|
|
@ -524,14 +524,17 @@ public class ActorDocTest extends AbstractJavaTest {
|
|||
// #creating-props-deprecated
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
// Commented out because this 'Props.create' overload is now deprecated
|
||||
// @Test(expected = IllegalArgumentException.class)
|
||||
public void creatingPropsIllegal() {
|
||||
/*
|
||||
// #creating-props-illegal
|
||||
// This will throw an IllegalArgumentException since some runtime
|
||||
// type information of the lambda is erased.
|
||||
// Use Props.create(actorClass, Creator) instead.
|
||||
Props props = Props.create(() -> new ActorWithArgs("arg"));
|
||||
// #creating-props-illegal
|
||||
*/
|
||||
}
|
||||
|
||||
public
|
||||
|
|
|
|||
|
|
@ -24,14 +24,27 @@ public class DnsCompileOnlyDocTest {
|
|||
final Duration timeout = Duration.ofMillis(1000L);
|
||||
|
||||
// #resolve
|
||||
Option<Dns.Resolved> initial = Dns.get(system).cache().resolve("google.com", system, actorRef);
|
||||
Option<Dns.Resolved> cached = Dns.get(system).cache().cached("google.com");
|
||||
Option<DnsProtocol.Resolved> initial =
|
||||
Dns.get(system)
|
||||
.cache()
|
||||
.resolve(
|
||||
new DnsProtocol.Resolve("google.com", DnsProtocol.ipRequestType()),
|
||||
system,
|
||||
actorRef);
|
||||
Option<DnsProtocol.Resolved> cached =
|
||||
Dns.get(system)
|
||||
.cache()
|
||||
.cached(new DnsProtocol.Resolve("google.com", DnsProtocol.ipRequestType()));
|
||||
// #resolve
|
||||
|
||||
{
|
||||
// #actor-api-inet-address
|
||||
final ActorRef dnsManager = Dns.get(system).manager();
|
||||
CompletionStage<Object> resolved = ask(dnsManager, new Dns.Resolve("google.com"), timeout);
|
||||
CompletionStage<Object> resolved =
|
||||
ask(
|
||||
dnsManager,
|
||||
new DnsProtocol.Resolve("google.com", DnsProtocol.ipRequestType()),
|
||||
timeout);
|
||||
// #actor-api-inet-address
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue