Use lambdas when possible
Replace anonymous inner classes with lambda declarations (when possible using method references). See gh-9781
This commit is contained in:
committed by
Phillip Webb
parent
d16af43664
commit
2626a3a795
@@ -228,14 +228,7 @@ public class StartMojo extends AbstractRunMojo {
|
||||
final SpringApplicationAdminClient client = new SpringApplicationAdminClient(
|
||||
connection, this.jmxName);
|
||||
try {
|
||||
execute(this.wait, this.maxAttempts, new Callable<Boolean>() {
|
||||
|
||||
@Override
|
||||
public Boolean call() throws Exception {
|
||||
return (client.isReady() ? true : null);
|
||||
}
|
||||
|
||||
});
|
||||
execute(this.wait, this.maxAttempts, () -> (client.isReady() ? true : null));
|
||||
}
|
||||
catch (ReflectionException ex) {
|
||||
throw new MojoExecutionException("Unable to retrieve 'ready' attribute",
|
||||
|
||||
Reference in New Issue
Block a user