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 77335 - Random NPE after typing 'fori<space>'
Summary: Random NPE after typing 'fori<space>'
Status: CLOSED DUPLICATE of bug 72301
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2006-06-02 20:39 UTC by Martin Krauskopf
Modified: 2006-10-23 16:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE (3.02 KB, text/plain)
2006-06-02 20:39 UTC, Martin Krauskopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2006-06-02 20:39:32 UTC
(own fresh build, 1.6.0-beta2-b85, Substance L&F, Gnome 2.12.3, Slackware 10.2)

I just did 'fori<space>' to get for loop template and attached NPE was thrown.
Comment 1 Martin Krauskopf 2006-06-02 20:39:58 UTC
Created attachment 30762 [details]
NPE
Comment 2 Martin Krauskopf 2006-06-02 20:42:31 UTC
PS: on the second try it works as usually. Maybe it was because I:

1) fastly create:

  private static final int NUMBER_OF_PHILOSOPHERS = 5;

2) And then I go fastly to main method and type 'fori<space>' so the java-model
might not have been fully synchronized?
Comment 3 Jiri Prox 2006-06-05 09:32:57 UTC
Yes, you're right. It's caused be fast creating new method and using the
abbreviation in it. The source in not parsed at that time and abbreviation is
called in wrong context (class scope, not method scope). The exception thrown
when calling abbrev. in wrong context is already filed as issue 72301. The 2ns
problem - not parsing source when needed - is also reported (can not find number
now)

Thanks for your report

*** This issue has been marked as a duplicate of 72301 ***
Comment 4 Martin Krauskopf 2006-06-05 09:34:58 UTC
Ok, thanks.