Step to reproduce:
-- Open the attached Java project
-- Open the files: newXmlSchema.xsd and newWSDL.wsdl
-- The schema file contains element newElement at the top. Delete the name attribute. It makes the schema incorrect but it shouldn't cause an exception.
-- Switch to the wsdl and call its validation. The NPE happens. See the attachment.
Created attachment 90597 [details]
Created attachment 90598 [details]
NPE stack trace
The exception happens as a result of having a global schema component without name attribute. It is illegal case because all global components should have a name. But it can happen at least temporary because of editing xml sources manually.
I put P2 priority because the NPE doesn't cause any extra problems. It only affects index building and system goes on working without index.
The problem has initially appeared in gfesbv22 branch's automatic tests. Although it doesn't cause serious errors, it can scare customers. So it's necessary to think if we going to consider it as a candidate to 67patch.
Fixed in trunk http://hg.netbeans.org/main/rev/2dca0f29bace
Verified in trunk with build 26.11.2009
It's necessary to migrate the changes to NetBeans 6.7.1 branch
The fix has been ported into the release67_fixes repository.
I've verified the fix in NetBeans 6.7 after downloading updated modules from the update center.