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.
In the tasklist module I frequently obtain a Line object for various lines in files that I process. I sometimes use the Line object to show the line, or attach an annotation to it, and even showing the filename and line number corresponding to the Line. But every now and then I've encountered some weird problems after scanning an entire directory tree. Today I tracked it down and figured out why: for (some?) Bundle.properties files, the Line object I'm given from Line.Set.getCurrent(), will return null when I call getDataObject on it!!! I tried backtracking into the org.openide.text package to see what's causing it, and saw method names like getDataObjectHack(), so apparently this is a shaky area. But I've never seen the problem for regular java data objects (or html data objects or xml data objects), so I think this is specific to the properties data object. If you need help reproducing this: select some directory which contains a Bundle.properties file which has a copyright that does not include the current year; then in the Tools menu select Scan Directory for Suggestions (you'll need the tasklist modules installed for this). Now look in the Copyright Problems section for an entry where the filename is "null".
It may be caused by fact that Bundle data object groups several files, all of them in fact playing primary role. Properties LocaleNode cannot provide EditorCookie extends LineCookie that returns data object for all instances. Line documentation permits to return null. I'm affraid that there does not exist a solution, it's similar to issue 31061.
Verified.