Skip to content

Commit

Permalink
Change filed name to 'config' for prevent dupricateing with parent cl…
Browse files Browse the repository at this point in the history
…ass property

See mybatisgh-1551
  • Loading branch information
kazuki43zoo committed Oct 26, 2019
1 parent 52e4358 commit c524574
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/org/apache/ibatis/type/UnknownTypeHandler.java
Expand Up @@ -33,7 +33,8 @@
public class UnknownTypeHandler extends BaseTypeHandler<Object> {

private static final ObjectTypeHandler OBJECT_TYPE_HANDLER = new ObjectTypeHandler();
private final Configuration configuration;
// TODO Rename to 'configuration' after removing the 'configuration' property(deprecated property) on parent class
private final Configuration config;
private final Supplier<TypeHandlerRegistry> typeHandlerRegistrySupplier;

/**
Expand All @@ -43,7 +44,7 @@ public class UnknownTypeHandler extends BaseTypeHandler<Object> {
* @since 3.5.4
*/
public UnknownTypeHandler(Configuration configuration) {
this.configuration = configuration;
this.config = configuration;
this.typeHandlerRegistrySupplier = configuration::getTypeHandlerRegistry;
}

Expand All @@ -55,7 +56,7 @@ public UnknownTypeHandler(Configuration configuration) {
*/
@Deprecated
public UnknownTypeHandler(TypeHandlerRegistry typeHandlerRegistry) {
this.configuration = new Configuration();
this.config = new Configuration();
this.typeHandlerRegistrySupplier = () -> typeHandlerRegistry;
}

Expand Down Expand Up @@ -109,7 +110,7 @@ private TypeHandler<?> resolveTypeHandler(ResultSet rs, String column) {
columnIndexLookup = new HashMap<>();
ResultSetMetaData rsmd = rs.getMetaData();
int count = rsmd.getColumnCount();
boolean useColumnLabel = configuration.isUseColumnLabel();
boolean useColumnLabel = config.isUseColumnLabel();
for (int i = 1; i <= count; i++) {
String name = useColumnLabel ? rsmd.getColumnLabel(i) : rsmd.getColumnName(i);
columnIndexLookup.put(name,i);
Expand Down

0 comments on commit c524574

Please sign in to comment.