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 247882

Summary: NullPointerException at Outline.editCellAt(Outline.java:759)
Product: platform Reporter: ebakke
Component: Outline&TreeTableAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 8.0.1   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: Stack trace showing the NPE in Outline.editCellAt(Outline.java:759)
Simple platform application exhibiting the bug

Description ebakke 2014-10-13 05:53:33 UTC
Created attachment 149857 [details]
Stack trace showing the NPE in Outline.editCellAt(Outline.java:759)

When an OutlineView is created with getOutline().setFillsViewportHeight(true)/setDragEnabled(true), a NullPointerException occurs if the area below the last row is clicked (because convertRowIndexToModel will return -1 and getPathForRow in turn will return null). Stack trace is attached.
Comment 1 ebakke 2014-10-13 05:55:40 UTC
Created attachment 149858 [details]
Simple platform application exhibiting the bug

To reproduce the bug in the attached example platform application, run the application and click the gray area below the example nodes in the central TopComponent.
Comment 2 ebakke 2014-10-13 06:11:57 UTC
Setting to P4 since there is a workaround--simply set setFillsViewportHeight(false).
Comment 3 Martin Entlicher 2014-10-13 07:06:52 UTC
Thanks for the testing application.
The NPE is fixed by changeset:   279250:1cd094773c10
http://hg.netbeans.org/core-main/rev/1cd094773c10
Comment 4 ebakke 2014-10-13 16:14:05 UTC
Thanks for the fix! My platform app loves OutlineView :-)
Comment 5 Martin Entlicher 2014-10-13 16:28:46 UTC
We're glad to hear that. :-) Thanks.
Comment 6 Quality Engineering 2014-10-14 03:13:39 UTC
Integrated into 'main-silver', will be available in build *201410140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1cd094773c10
User: mentlicher@netbeans.org
Log: #247882: Prevent from NPEs.