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.

Bug 75499

Summary: NPE while choosing template for "for"
Product: editor Reporter: Peter Pis <ppis>
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: NPE

Description Peter Pis 2006-04-25 14:26:03 UTC
NetBeans IDE Dev (Build 200604241800)
1.5.0_06; Java HotSpot(TM) Client VM 1.5.0_06-b05
Windows XP version 5.1 running on x86
en_GB (nb); Cp1252

Steps:
1. Open class into the editor tab. 
2. Add new method in it.
3. Type "for" and invoke code completion
4. Choose "for(int i=0; i < ...)" (3rd option)

NPE is thrown.
Comment 1 Peter Pis 2006-04-25 14:26:33 UTC
Created attachment 30039 [details]
NPE
Comment 2 Jiri Prox 2006-04-25 14:48:31 UTC
I suppose you called CC when method was just created and the whole file was not
reparsed. Am I right? The abbrev is then called form wrong context (see issue
72301 and issue 75338)
Comment 3 Dusan Balek 2006-10-26 14:51:46 UTC
Fixed with the new Java language infrastructure recently merged to trunk.
Comment 4 Peter Pis 2006-10-30 13:40:47 UTC
Verified in NetBeans IDE Dev (Build 200610261800)