橘子899 2022-03-15 23:42 采纳率: 78.6%
浏览 26
已结题

请问下这个问题怎么解决java.lang.IllegalArgumentException: param topNode is null.

问题遇到的现象和发生背景
_请问下这个问题怎么解决java.lang.IllegalArgumentException: param topNode is null.


at cn.com.lundong.feishu.core.contact.vo.DeptTreeVo.appendTopNode(DeptTreeVo.java:70)
at cn.com.lundong.feishu.core.contact.service.helper.FeishuDeptHelper.buildDeptTree(FeishuDeptHelper.java:168)
at cn.com.lundong.feishu.core.contact.service.helper.FeishuDeptHelper.buildDeptHierarchy(FeishuDeptHelper.java:84)
at cn.com.lundong.feishu.core.contact.service.impl.DeptHierarchyServiceImpl.buildDeptAndSubHierarchyById(DeptHierarchyServiceImpl.java:144)
at cn.com.lundong.feishu.core.contact.service.impl.DeptHierarchyServiceImpl$$FastClassBySpringCGLIB$$c285120.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at cn.com.lundong.feishu.core.contact.service.impl.DeptHierarchyServiceImpl$$EnhancerBySpringCGLIB$$207d5be4.buildDeptAndSubHierarchyById(<generated>)
at cn.com.lundong.feishu.core.facade.impl.FeishuDeptSyncFacadeImpl.syncPlatformDept(FeishuDeptSyncFacadeImpl.java:411)
at sun.reflect.GeneratedMethodAccessor1017.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205)
at com.sun.proxy.$Proxy163.syncPlatformDept(Unknown Source)
at cn.com.lundong.feishu.core.app.open.callback.handler.event.ContactChangeEventHandler.handle(ContactChangeEventHandler.java:91)
at cn.com.lundong.feishu.core.app.open.callback.handler.event.ContactChangeEventHandler.handle(ContactChangeEventHandler.java:30)
at cn.com.lundong.feishu.core.app.open.callback.MessageEventDispatcher.handle(MessageEventDispatcher.java:40)
at cn.com.lundong.feishu.core.app.open.callback.MessageEventDispatcher.handle(MessageEventDispatcher.java:18)
at cn.com.lundong.feishu.core.app.open.callback.CallbackMessageQueueHandler.handleQueue(CallbackMessageQueueHandler.java:30)
at cn.com.lundong.feishu.core.app.open.callback.CallbackMessageQueueHandler.handleQueue(CallbackMessageQueueHandler.java:13)
at cn.com.lundong.base.mq.RedisSimpleQueueConsumer$QueueRun.lambda$run$1(RedisSimpleQueueConsumer.java:214)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

代码如下:

public Collection<DeptTreeNodeVo> collectSubDept(Long parentId, boolean includeParentDept, boolean includeAllSubDept) {
        if (parentId == null) {
            throw new IllegalArgumentException("param parentId is null.");
        }

        if (parentId == 0) {
            // 根部门,直接返回整个部门树节点列表
            return treeNodes;
        }

        List<DeptTreeNodeVo> depts = new LinkedList<>();
```java




![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/974208853746110.png "#left")
  • 写回答

4条回答 默认 最新

  • CSDN专家-sinJack 2022-03-15 23:49
    关注

    param topNode is null
    topNode参数为空

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 5月15日
  • 已采纳回答 5月7日
  • 创建了问题 3月15日

悬赏问题

  • ¥15 如何制作永久二维码,最好是微信也可以扫开的。(相关搜索:管理系统)
  • ¥15 delphi indy cookie 有效期
  • ¥15 labelme打不开怎么办
  • ¥35 按照图片上的两个任务要求,用keil5写出运行代码,并在proteus上仿真成功,🙏
  • ¥15 免费的电脑视频剪辑类软件如何盈利
  • ¥30 MPI读入tif文件并将文件路径分配给各进程时遇到问题
  • ¥15 pycharm中导入模块出错
  • ¥20 Ros2 moveit2 Windows环境配置,有偿,价格可商议。
  • ¥15 有关“完美的代价”问题的代码漏洞
  • ¥15 请帮我看一下这个简易化学配平器的逻辑有什么问题吗?