Skip to content

Commit 8a766af

Browse files
committed
Remove reflector in favor of a Supplier
The reflector will cause problems in Java9. Better to just avoid it from the start.
1 parent 674bae3 commit 8a766af

File tree

21 files changed

+23
-1161
lines changed

21 files changed

+23
-1161
lines changed

src/main/java/org/mybatis/dynamic/sql/insert/InsertDSL.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
import java.util.ArrayList;
1919
import java.util.List;
20+
import java.util.function.Supplier;
2021

2122
import org.mybatis.dynamic.sql.SqlColumn;
2223
import org.mybatis.dynamic.sql.SqlTable;
23-
import org.mybatis.dynamic.sql.util.BeanPropertyGetter;
2424
import org.mybatis.dynamic.sql.util.ConstantMapping;
2525
import org.mybatis.dynamic.sql.util.InsertMapping;
2626
import org.mybatis.dynamic.sql.util.NullMapping;
@@ -77,8 +77,8 @@ public InsertDSL<T> toProperty(String property) {
7777
return InsertDSL.this;
7878
}
7979

80-
public InsertDSL<T> toPropertyWhenPresent(String property) {
81-
if (BeanPropertyGetter.instance().getPropertyValue(record, property) != null) {
80+
public InsertDSL<T> toPropertyWhenPresent(String property, Supplier<?> valueSupplier) {
81+
if (valueSupplier.get() != null) {
8282
toProperty(property);
8383
}
8484
return InsertDSL.this;

src/main/java/org/mybatis/dynamic/sql/reflection/MetaObject.java

Lines changed: 0 additions & 77 deletions
This file was deleted.

src/main/java/org/mybatis/dynamic/sql/reflection/ReflectionException.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/main/java/org/mybatis/dynamic/sql/reflection/Reflector.java

Lines changed: 0 additions & 213 deletions
This file was deleted.

src/main/java/org/mybatis/dynamic/sql/reflection/ReflectorFactory.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)