Skip to content

Commit 2e28d26

Browse files
committed
Polish
1 parent 06e3f37 commit 2e28d26

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/BoundConfigurationProperties.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,10 +72,8 @@ public Map<ConfigurationPropertyName, ConfigurationProperty> getAll() {
7272
* @return a {@link BoundConfigurationProperties} or {@code null}
7373
*/
7474
public static BoundConfigurationProperties get(ApplicationContext context) {
75-
if (!context.containsBeanDefinition(BEAN_NAME)) {
76-
return null;
77-
}
78-
return context.getBean(BEAN_NAME, BoundConfigurationProperties.class);
75+
return (!context.containsBeanDefinition(BEAN_NAME)) ? null
76+
: context.getBean(BEAN_NAME, BoundConfigurationProperties.class);
7977
}
8078

8179
static void register(BeanDefinitionRegistry registry) {

0 commit comments

Comments
 (0)