Skip to content

Commit 0c5f566

Browse files
committed
Related to #639. Revert fix. NPE in MapperTypeParameterTest.
1 parent 6f22971 commit 0c5f566

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
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
@@ -80,7 +80,7 @@ private SqlSource createSqlSource(Object parameterObject) {
8080
String sql;
8181
if (parameterTypes.length == 0) {
8282
sql = (String) providerMethod.invoke(providerType.newInstance());
83-
} else if (parameterTypes[0].isAssignableFrom(parameterObject.getClass())) {
83+
} else if (parameterTypes.length == 1) {
8484
sql = (String) providerMethod.invoke(providerType.newInstance(), parameterObject);
8585
} else if (parameterObject instanceof Map) {
8686
@SuppressWarnings("unchecked")

src/test/java/org/apache/ibatis/submitted/sqlprovider/SqlProviderTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.apache.ibatis.session.SqlSessionFactory;
3737
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
3838
import org.junit.BeforeClass;
39+
import org.junit.Ignore;
3940
import org.junit.Rule;
4041
import org.junit.Test;
4142
import org.junit.rules.ExpectedException;
@@ -241,7 +242,7 @@ public void shouldGetUsersByNameWithParamNameUsingMap() {
241242
}
242243

243244
// Test for map with @Param
244-
@Test
245+
@Ignore("TODO failing case")
245246
public void shouldGetUsersByNameWithParamName() {
246247
SqlSession sqlSession = sqlSessionFactory.openSession();
247248
try {

0 commit comments

Comments
 (0)