Use lambdas when possible

Replace anonymous inner classes with lambda declarations (when possible
using method references).

See gh-9781
This commit is contained in:
Emanuel Campolo
2017-07-24 23:11:47 -07:00
committed by Phillip Webb
parent d16af43664
commit 2626a3a795
150 changed files with 983 additions and 2596 deletions

View File

@@ -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",