mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🎨 修复代码
This commit is contained in:
parent
b1015a35b8
commit
cb7efb79cf
@ -110,8 +110,11 @@ public class WxPayOrderNotifyResultConverter extends AbstractReflectionConverter
|
||||
Object val = context.convertAnother(obj, field.getType());
|
||||
try {
|
||||
if (val != null) {
|
||||
//这里加一个看似多余的(String)强转可解决高jdk版本下的编译报错问题,详情见讨论https://github.com/vaadin/framework/issues/10737
|
||||
PropertyDescriptor pd = new PropertyDescriptor(field.getName(), obj.getClass());
|
||||
/*
|
||||
这里加一个看似多余的(String)强转可解决高jdk版本下的编译报错问题,
|
||||
详情见讨论https://github.com/vaadin/framework/issues/10737
|
||||
*/
|
||||
PropertyDescriptor pd = new PropertyDescriptor((String) field.getName(), obj.getClass());
|
||||
pd.getWriteMethod().invoke(obj, val);
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
@ -129,9 +132,7 @@ public class WxPayOrderNotifyResultConverter extends AbstractReflectionConverter
|
||||
|
||||
private WxPayOrderNotifyCoupon getElement(Map<Integer, WxPayOrderNotifyCoupon> coupons, String nodeName) {
|
||||
Integer index = Integer.valueOf(StringUtils.substringAfterLast(nodeName, "_"));
|
||||
if (coupons.get(index) == null) {
|
||||
coupons.put(index, new WxPayOrderNotifyCoupon());
|
||||
}
|
||||
coupons.computeIfAbsent(index, k -> new WxPayOrderNotifyCoupon());
|
||||
|
||||
return coupons.get(index);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user