diff --git a/example/pom.xml b/example/pom.xml
index 297cd2ae..9e32182d 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -59,7 +59,7 @@
com.github.liaochong
myexcel
- 4.3.0.RC
+ 4.3.0.RC5
org.apache.logging.log4j
diff --git a/pom.xml b/pom.xml
index 89290754..4e32a31e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
com.github.liaochong
myexcel
- 4.3.0.RC4
+ 4.3.0.RC5
jar
myexcel
@@ -23,9 +23,9 @@
UTF-8
1.8
5.2.3
- 1.15.4
+ 1.16.1
1.18.22
- 3.15.0.RELEASE
+ 3.15.4.RELEASE
2.3
2.3.32
3.0.9
@@ -33,7 +33,7 @@
5.0.3
4.0.1
5.8.2
- 3.8.2
+ 3.9.4
1.10.0
diff --git a/src/main/java/com/github/liaochong/myexcel/core/AbstractReadHandler.java b/src/main/java/com/github/liaochong/myexcel/core/AbstractReadHandler.java
index 88b844aa..f35e7e06 100644
--- a/src/main/java/com/github/liaochong/myexcel/core/AbstractReadHandler.java
+++ b/src/main/java/com/github/liaochong/myexcel/core/AbstractReadHandler.java
@@ -158,14 +158,14 @@ private void setConfiguration(Class dataType, boolean isMapType) {
ClassFieldContainer classFieldContainer = ReflectUtil.getAllFieldsOfClass(dataType);
ConfigurationUtil.parseConfiguration(classFieldContainer, readContext.convertContext.configuration);
- List fields = classFieldContainer.getFieldsByAnnotation(ExcelColumn.class);
- fields.forEach(field -> {
- ExcelColumn excelColumn = field.getAnnotation(ExcelColumn.class);
+ List fields = classFieldContainer.getFieldsByAnnotation(ExcelColumn.class);
+ fields.forEach(fieldDefinition -> {
+ ExcelColumn excelColumn = fieldDefinition.getField().getAnnotation(ExcelColumn.class);
if (excelColumn == null) {
return;
}
ExcelColumnMapping mapping = ExcelColumnMapping.mapping(excelColumn);
- readContext.convertContext.excelColumnMappingMap.put(field, mapping);
+ readContext.convertContext.excelColumnMappingMap.put(fieldDefinition.getField(), mapping);
});
}
@@ -183,7 +183,7 @@ protected void setFieldHandlerFunction() {
fieldHandler = (colNum, content) -> {
FieldDefinition fieldDefinition = fieldDefinitionMap.get(colNum);
if (fieldDefinition != null) {
- convert(content, currentRow.getRowNum(), colNum, fieldDefinition.getField());
+ convert(content, currentRow.getRowNum(), colNum, fieldDefinition);
}
};
} else {
@@ -197,7 +197,7 @@ protected void setFieldHandlerFunction() {
boolean isList = fieldDefinition.getField().getType() == List.class;
if (!isList && fieldDefinition.getParentFields().isEmpty()) {
if (target == null) {
- convert(content, currentRow.getRowNum(), colNum, fieldDefinition.getField());
+ convert(content, currentRow.getRowNum(), colNum, fieldDefinition);
}
} else {
try {
@@ -227,7 +227,7 @@ protected void setFieldHandlerFunction() {
}
}
if (isBase) {
- convert(prevObj, content, currentRow.getRowNum(), colNum, fieldDefinition.getField());
+ convert(prevObj, content, currentRow.getRowNum(), colNum, fieldDefinition);
} else {
Object targetParent = ((List) prevObj).get(((List) prevObj).size() - 1);
Object targetObj = fieldDefinition.getField().get(targetParent);
@@ -235,7 +235,7 @@ protected void setFieldHandlerFunction() {
targetObj = new LinkedList<>();
fieldDefinition.getField().set(targetParent, targetObj);
}
- convert(targetObj, content, currentRow.getRowNum(), colNum, fieldDefinition.getField());
+ convert(targetObj, content, currentRow.getRowNum(), colNum, fieldDefinition);
}
} else {
Object value;
@@ -245,7 +245,7 @@ protected void setFieldHandlerFunction() {
} else {
value = ((List