Polishing Optional usage
This commit is contained in:
committed by
Juergen Hoeller
parent
4e5723ca9e
commit
246e4977a2
@@ -277,7 +277,7 @@ class AutowiredConfigurationTests {
|
||||
|
||||
@Bean
|
||||
public TestBean testBean(Optional<Colour> colour, Optional<List<Colour>> colours) {
|
||||
if (!colour.isPresent() && !colours.isPresent()) {
|
||||
if (colour.isEmpty() && colours.isEmpty()) {
|
||||
return new TestBean("");
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user