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 123044

Summary: Surround with... doesn't work
Product: java Reporter: Ivan Sidorkin <ivansidorkin>
Component: EditorAssignee: Jan Lahoda <jlahoda>
Status: CLOSED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Ivan Sidorkin 2007-11-29 11:56:55 UTC
- open java file
- select some code
- try to click Surround With icon in gutter or Alt-Enter

java.lang.NullPointerException
	at javax.swing.ScrollPaneLayout.preferredLayoutSize(ScrollPaneLayout.java:494)
	at java.awt.Container.preferredSize(Container.java:1669)
	at java.awt.Container.getPreferredSize(Container.java:1654)
	at javax.swing.JComponent.getPreferredSize(JComponent.java:1645)
	at org.netbeans.modules.editor.hints.borrowed.ScrollCompletionPane.<init>(ScrollCompletionPane.java:104)
	at org.netbeans.modules.editor.hints.HintsUI.showPopup(HintsUI.java:347)
	at org.netbeans.modules.editor.hints.HintsUI.invokeDefaultAction(HintsUI.java:484)
	at org.netbeans.modules.editor.hints.HintsUI.keyPressed(HintsUI.java:512)
Comment 1 Jan Lahoda 2007-11-29 12:02:25 UTC
I am afraid that this is a know JDK bug (affecting all editor hints, not only the Surround with hint). See issue #116592
for more details.

*** This issue has been marked as a duplicate of 116592 ***