Skip to content

Commit f00184e

Browse files
committed
NPE check for constructor parameter mapperMethod
1 parent 3b000cc commit f00184e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/apache/ibatis/builder/annotation/ProviderSqlSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public ProviderSqlSource(Configuration configuration, Object provider, Class<?>
5858
String providerMethodName;
5959
try {
6060
this.configuration = configuration;
61-
Lang lang = mapperMethod.getAnnotation(Lang.class);
61+
Lang lang = mapperMethod == null ? null : mapperMethod.getAnnotation(Lang.class);
6262
this.languageDriver = lang == null ?
6363
configuration.getLanguageRegistry().getDefaultDriver() :
6464
configuration.getLanguageRegistry().getDriver(lang.value());

0 commit comments

Comments
 (0)