Remove unnecessary lambda blocks

Remove lambda blocks that aren't needed and replace instead with a
simple expression.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-07-29 18:18:00 -07:00
committed by Rob Winch
parent 52f20b5281
commit 612fb22a7f
13 changed files with 48 additions and 73 deletions

View File

@@ -51,9 +51,7 @@ public class SecurityJackson2ModulesTests {
@Test
public void readValueWhenNotAllowedOrMappedThenThrowsException() {
String content = "{\"@class\":\"org.springframework.security.jackson2.SecurityJackson2ModulesTests$NotAllowlisted\",\"property\":\"bar\"}";
assertThatThrownBy(() -> {
this.mapper.readValue(content, Object.class);
}).hasStackTraceContaining("allowlist");
assertThatThrownBy(() -> this.mapper.readValue(content, Object.class)).hasStackTraceContaining("allowlist");
}
@Test