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 150985 - Problems with code generation when class name contains $
Summary: Problems with code generation when class name contains $
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-22 10:15 UTC by Jiri Prox
Modified: 2009-11-02 10:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2008-10-22 10:15:41 UTC
Product Version: NetBeans IDE 6.5 RC1 (Build 200810171318)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.22-15-generic running on i386; UTF-8; en_US (nb)

There are problems with inserting code either from inset code menu or by CC when class name or package name contains $

Steps to reproduce:
1) create class Test in package '$'
2) use insert code to create constructor

java.lang.NullPointerException
	at org.netbeans.api.java.source.GeneratorUtilities.createConstructor(GeneratorUtilities.java:337)
	at org.netbeans.modules.editor.java.JavaCompletionItem$InitializeAllConstructorItem$2.run(JavaCompletionItem.java:2987)
	at org.netbeans.modules.editor.java.JavaCompletionItem$InitializeAllConstructorItem$2.run(JavaCompletionItem.java:2968)
	at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:953)
	at
org.netbeans.modules.editor.java.JavaCompletionItem$InitializeAllConstructorItem.substituteText(JavaCompletionItem.java:2966)
	at org.netbeans.modules.editor.java.JavaCompletionItem.defaultAction(JavaCompletionItem.java:245)
	at org.netbeans.modules.editor.completion.CompletionImpl.dispatchKeyEvent(CompletionImpl.java:564)
	at org.netbeans.modules.editor.completion.CompletionImpl.keyPressed(CompletionImpl.java:364)
...

other exceptions can be reproduced by changing the class name to $Class and trying to complete the name, use inset code
etc...
Comment 1 Jan Lahoda 2008-11-18 14:17:20 UTC
Seems quite artifical -> later.
Comment 2 Quality Engineering 2009-11-02 10:55:39 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX