空指针 - 试图解决......不能:-( [英] Null Pointer - Tried to resolve... cant :-(

查看:140
本文介绍了空指针 - 试图解决......不能:-(的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一周前发布了这个NullPointerException错误。我已经取得了进展,因为现在正在填充它的一部分。所有其他非上市课程的报告正在填充。所有其他非上市课程中的''gui''也正在填充。 DCWorkbenchGUI中的''report''没有被填充,并且没有填充ReportData中的''gui''。这两个都是问题,我已经尝试了一切让他们工作。任何帮助将不胜感激...谢谢


顺便说一下,我没有包含所有代码,因为它太多了


报告包中的ReportData类

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

解决方案

报告了nullpointer的哪一行?

各种行,但它取决于它的执行部分。我有一个错误的按钮(助理建议)...


在gui包中的DCWorkbenchGUI类 - 报告为空

展开 | 选择 | Wrap | 行号


1。)您在第33行传递空报告。此时变量报告尚未初始化且仍为空。

2.)不要使用空的挡块。它们隐藏异常而不是处理它们。


I posted this NullPointerException error a week ago. Ive made progress as now parts of it are being populated. ''report'' all throughout the other non-listed classes is being populated. ''gui'' all throughout the other non-listed classes is being populated too. ''report'' in DCWorkbenchGUI is not being populated and ''gui'' in ReportData is not being populated. Both of these are the problems and I have tried everything to get them to work. Any help would be much appreciated... thanks

btw, I have not included all the code as there is far too much of it

ReportData class in report package

Expand|Select|Wrap|Line Numbers

解决方案

Which line was reported for the nullpointer?


Various lines, but it depends what part of execution it is at. I have a button (Assistant Advice) which it errors on...

DCWorkbenchGUI Class in gui package - report is null

Expand|Select|Wrap|Line Numbers


1.) You are passing a null report on line 33. At that time the variable report has not yet been initialized and is still null.
2.) Do not use empty catch blocks. They hide exceptions instead of handling them.


这篇关于空指针 - 试图解决......不能:-(的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆