Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/io/github/millij/poi/util/Beans.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static String getFieldName(final Method method) {
*/
public static String getFieldValueAsString(final Object beanObj, final String fieldName) throws Exception {
// Property Descriptor
final PropertyDescriptor pd = new PropertyDescriptor(fieldName, beanObj.getClass());
final PropertyDescriptor pd = PROP_UTILS_BEAN.getPropertyDescriptor(beanObj, fieldName);
final Method getterMtd = pd.getReadMethod();

final Object value = getterMtd.invoke(beanObj);
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/io/github/millij/bean/Employee.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ public String getId() {
return id;
}

public void setId(String id) {
public Employee setId(String id) {
this.id = id;
return this;
}

@SheetColumn("Name")
Expand Down