Polish "Replace this lambda with a method reference"

Closes gh-15401
This commit is contained in:
Stephane Nicoll 2018-12-07 11:10:10 +01:00
parent 5c1813aef8
commit d5f90ffcfb
3 changed files with 4 additions and 6 deletions

View File

@ -72,8 +72,7 @@ public final class OAuth2ClientPropertiesRegistrationAdapter {
map.from(properties::getAuthorizationGrantType).as(AuthorizationGrantType::new)
.to(builder::authorizationGrantType);
map.from(properties::getRedirectUri).to(builder::redirectUriTemplate);
map.from(properties::getScope).as(StringUtils::toStringArray)
.to(builder::scope);
map.from(properties::getScope).as(StringUtils::toStringArray).to(builder::scope);
map.from(properties::getClientName).to(builder::clientName);
return builder.build();
}

View File

@ -131,8 +131,7 @@ public class ApplicationContextAssertProviderTests {
public void getSourceContextWhenContextFailsShouldThrowException() {
ApplicationContextAssertProvider<ApplicationContext> context = get(
this.startupFailureSupplier);
assertThatIllegalStateException()
.isThrownBy(context::getSourceApplicationContext)
assertThatIllegalStateException().isThrownBy(context::getSourceApplicationContext)
.withCause(this.startupFailure).withMessageContaining("failed to start");
}

View File

@ -66,8 +66,8 @@ public class BindResultTests {
@Test
public void getWhenHasNoValueShouldThrowException() {
BindResult<String> result = BindResult.of(null);
assertThatExceptionOfType(NoSuchElementException.class)
.isThrownBy(result::get).withMessageContaining("No value bound");
assertThatExceptionOfType(NoSuchElementException.class).isThrownBy(result::get)
.withMessageContaining("No value bound");
}
@Test