This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Linux: build 200508281800: There occured NPE (see attachment) repeatedly which was very annoying, basically blocking from work.
Created attachment 24435 [details] exception
reassigning to java module
*** Issue 64061 has been marked as a duplicate of this issue. ***
Either there is cp root in classpath, which does not have associated ClassIndex, or there is null value in any cp root. I can check existence of index for given cp root. IMO a cause of problem is somewhere else (there has to be index for given cp root and cp root cannot be null.) Peter, are you able to provide additional information? i) Is it reproducible, ii) can you provide project (or describe your project, if it is netbeans module, j2se project etc.) iii) and source code and line number where problem appears? Thanks.
i) I don't know the steps how to reproduce, I hit the issue after working some time (on our project). ii) Our project is based on NB (4.0), plus our modules,I mount it as a project all together (i.e. the project root dir is a parent dir of all modules dirs), when I specify the classpath, src path accordingly (pointing to modules I am working on). iii) about this I am not sure, once I hit it, it pops up repeatedly, and I have to restart in order to be able to work again. It doesn't seem to be specific line of code, it is always in different source (AFAIK). Please for now fix the NPE, even by the check (if it is necessary). NPE is a runtime exception, which means the code has some flaw, which should be changed. If there is some variable which can be null, the it has to be checked against that possibility, if the variable (returned from some method) 'is guaranteed' non-null, then the method should be checked and assured it returns non-null, etc. (it can chain). Thanks. I hope the stack trace is enough in this case.
Fixed. Added check and assertions. Checking in src/org/netbeans/modules/java/hints/JavaHintsProvider.java; /cvs/java/hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java,v <-- JavaHintsProvider.java new revision: 1.43; previous revision: 1.42 done
Previous fix was incorrect. Checking in src/org/netbeans/modules/java/hints/JavaHintsProvider.java; /cvs/java/hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java,v <-- JavaHintsProvider.java new revision: 1.44; previous revision: 1.43 done
Reorganization of java component