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.
I get the attached NPE from Hints on a line where there is an error that the variable might have not been initialized.
Created attachment 23493 [details] NPE stacktrace
I tried it and it seems it works. My test code was Object o; String s = (String) o; So closing as WORKSFORME. Please, provide always part of your code where problem was found, as you cannot generalize that if it does not work in your particular case, it does not work always. This will allow us to fix the problem instead of closing because of insufficient information.
My code snippet where this happens: ... BufferedReader in; try { in = new BufferedReader(new FileReader(portFile)); } catch (FileNotFoundException ex) { ex.printStackTrace(); } String check; try { check = in.readLine(); } catch (IOException ex) { ex.printStackTrace(); } ... on the line where check variable is initialized.
When I use the code, it still works. But when I tried your steps to reporoduce it in jEdit.java file, I was able to reproduce. Source contains 'tab' characters, which can cause the bug.
It was caused by bug in try wrapper, but the problem occurs later. Fixed. Checking in src/org/netbeans/modules/javacore/TryWrapper.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/TryWrapper.java,v <-- TryWrapper.java new revision: 1.15; previous revision: 1.14 done
Reorganization of java component