Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 3af9edf

Browse files
ttddyysdeleuze
authored andcommitted
Remove unnecessary null check
The `BeanUtils#getResolvableConstructor()` does not return `null`. This commit removes the unnecessary null check. Signed-off-by: Tadaya Tsuyukubo <tadaya@ttddyy.net>
1 parent dfee895 commit 3af9edf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-aot/src/main/java/org/springframework/aot/factories/PrivateFactoriesCodeContributor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public boolean canContribute(SpringFactory springFactory) {
4646
try {
4747
Constructor<?> constructor = BeanUtils.getResolvableConstructor(factory);
4848
return !Modifier.isPublic(factory.getModifiers()) ||
49-
(constructor != null && constructor.getParameterCount() == 0 && !Modifier.isPublic(constructor.getModifiers()));
49+
(constructor.getParameterCount() == 0 && !Modifier.isPublic(constructor.getModifiers()));
5050
} catch (IllegalStateException | NoClassDefFoundError ex) {
5151
return false;
5252
}

0 commit comments

Comments
 (0)