-
Bug
-
Resolution: Fixed
-
Normal
-
6.5.8.1, 9.5.0.2
-
Security Level: Jimmy
Steps to Reproduce
run the code below:
<zk> <tree id="tree"/> <zscript><![CDATA[ tree.setModel(new DefaultTreeModel(new DefaultTreeNode("root"))); tree.setModel(null); ]]></zscript> </zk>
Current Result
15:36:35.919 [qtp122114483-23] ERROR org.zkoss.zk.ui.impl.UiEngineImpl - java.lang.NullPointerException: null at org.zkoss.zul.Tree.renderTree(Tree.java:1990) at org.zkoss.zul.Tree.onInitRender(Tree.java:1870) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3165) at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3096) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1890) at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1662) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:556) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:377) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:220) ...
Expected Result
no exception, render empty tree