From 40c3d11dbdc683053512eec882039b93bc314823 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Fri, 31 Aug 2018 15:32:31 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-10882=E3=80=9010.0=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=8C=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=92=8C=E6=95=B0=E6=8D=AE=E6=A0=A1=E9=AA=8C=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/controlpane/ObjectJControlPane.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java index 5fc72214c..8ac0aef10 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java @@ -24,7 +24,14 @@ public abstract class ObjectJControlPane extends JListControlPane { @Override public BasicBeanPane createPaneByCreators(NameableCreator creator) { try { - return Reflect.on(creator.getUpdatePane()).create(object).get(); + Class target = creator.getUpdatePane(); + Reflect reflect = Reflect.on(target); + // 判断是否存在对应构造函数 + if (reflect.matchConstructor(object)) { + return reflect.create(object).get(); + } + + return reflect.create().get(); } catch (Exception e) { return super.createPaneByCreators(creator); }