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 need to get a source element offset for elements in a JavaClass which has not any Resource (there isn't any physical file for it). For example the following code throws a NPE when the jspMethod is in a JavaClass without a Resource: StatementBlock sb = jmp.getStatementBlock().createStatementBlock(); Statement s = jmp.getEmptyStatement().createEmptyStatement(); sb.getStatements().add(s); jspMethod.setBody(sb); s.getStartOffset(); //NPE here: java.lang.NullPointerException at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.testResourceChange(MetadataElement.java:923) at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getStartOffset(MetadataElement.java:935)
Javacore module was replaced by Retouche infrastructure. This bug is not valid in trunk any more.
Reorganization of java component