Skip to content

Commit ea30c09

Browse files
committed
Polish 16263e3
See gh-22105
1 parent 263adf1 commit ea30c09

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,20 @@ private void load(Class<?> source) {
159159
}
160160
}
161161

162-
private int load(Resource source) {
162+
private void load(Resource source) {
163163
if (source.getFilename().endsWith(".groovy")) {
164164
if (this.groovyReader == null) {
165165
throw new BeanDefinitionStoreException("Cannot load Groovy beans without Groovy on classpath");
166166
}
167-
return this.groovyReader.loadBeanDefinitions(source);
167+
this.groovyReader.loadBeanDefinitions(source);
168+
}
169+
else {
170+
this.xmlReader.loadBeanDefinitions(source);
168171
}
169-
return this.xmlReader.loadBeanDefinitions(source);
170172
}
171173

172-
private int load(Package source) {
173-
return this.scanner.scan(source.getName());
174+
private void load(Package source) {
175+
this.scanner.scan(source.getName());
174176
}
175177

176178
private void load(CharSequence source) {

0 commit comments

Comments
 (0)