Skip to content

Commit 28e1b90

Browse files
committed
Merge pull request #17916 from kioyong
* pr/17916: Remove unnecessary null check Closes gh-17916
2 parents 88c17b5 + 12bfca5 commit 28e1b90

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/info/ProjectInfoAutoConfiguration.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.springframework.context.annotation.Conditional;
3535
import org.springframework.context.annotation.Configuration;
3636
import org.springframework.core.env.Environment;
37-
import org.springframework.core.io.DefaultResourceLoader;
3837
import org.springframework.core.io.Resource;
3938
import org.springframework.core.io.ResourceLoader;
4039
import org.springframework.core.io.support.EncodedResource;
@@ -95,12 +94,9 @@ private Properties loadSource(Resource location, Charset encoding) throws IOExce
9594

9695
static class GitResourceAvailableCondition extends SpringBootCondition {
9796

98-
private final ResourceLoader defaultResourceLoader = new DefaultResourceLoader();
99-
10097
@Override
10198
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
10299
ResourceLoader loader = context.getResourceLoader();
103-
loader = (loader != null) ? loader : this.defaultResourceLoader;
104100
Environment environment = context.getEnvironment();
105101
String location = environment.getProperty("spring.info.git.location");
106102
if (location == null) {

0 commit comments

Comments
 (0)