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 203500

Summary: DocumentLine$Set.getCurrent is unreliable if document is loading
Product: platform Reporter: Egor Ushakov <gorrus>
Component: TextAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 196695    

Description Egor Ushakov 2011-10-11 12:23:24 UTC
getCurrent method depends on method offset which calls listener.support.getDocument() which can be null if document is loading (see ClonableEditorSupport:940). Thus when document is loading getCurrent sometimes silently returns line 0 not the requested line...
Comment 1 Egor Ushakov 2011-10-20 09:57:40 UTC
*** Bug 196695 has been marked as a duplicate of this bug. ***
Comment 2 Miloslav Metelka 2013-08-28 12:33:54 UTC
Is there any way (test or a user problem) where the problem would be reproduced?
Comment 3 Egor Ushakov 2013-08-28 12:39:57 UTC
there is a description in the bug 196695, I have not seen any other cases
Comment 4 Miloslav Metelka 2015-10-26 09:42:46 UTC
I was not able to reproduce (with the description in issue 196695). If the problem persists please reopen.