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.
Summary: | NullPointerException at org.openide.text.UndoRedoManager.editToBeUndoneRedone | ||
---|---|---|---|
Product: | java | Reporter: | aldobrucale <aldobrucale> |
Component: | Refactoring | Assignee: | Jan Becicka <jbecicka> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | MackSix, ttokoly |
Priority: | P2 | ||
Version: | 7.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 186410 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace Analysis of the undo/redo performed during refactoring and its undo. |
Description
aldobrucale
2012-03-28 14:44:52 UTC
Created attachment 117414 [details]
stacktrace
Created attachment 117424 [details] stacktrace 1. Unzip a project default to some work directory - there is link: http://wiki.netbeans.org/wiki/images/2/2d/Default_TS_60_Refactoring.zip 2. Start IDE with a clean userdir 3. Invoke File | Open Project... action 4. Select unzipped project default 5. Scanning structure of project should be performed (it takes a while) 6. Put caret on field protectedProperty of the org.netbeans.tests.examples.packb.BeanA class in the Project view and invoke Refactor | Rename action from the popup menu. 7. Fill a new field name protectedPropertyRenamed, check checkbox 'Rename Getters and Setters' and confirm this dialog. There should be displayed a warning: O There are methods in subclasses/implementors of BeanA that override or implement this method. They will also be renamed. 8. If you agree with these changes press Do Refactoring button and changes will be performed. 9. Pressed Undo action. 10. This error shows up. Created attachment 117425 [details]
stacktrace
Same as before: Undo action after renaming a field with getters and setters.
Created attachment 117968 [details]
stacktrace
Undo a moved JFrame form with Internationlization.
I've reproduced the problem in a project attached by ttokoly according to given steps. I've fixed the NPE but undo of the refactoring does not succeed although I did no extra modifications (see attached analysis) so reassigning to refactoring for further evaluation. openide.text partial fix: http://hg.netbeans.org/jet-main/rev/248f9b21ad44 Created attachment 118141 [details]
Analysis of the undo/redo performed during refactoring and its undo.
Integrated into 'main-golden', will be available in build *201204130400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/248f9b21ad44 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #210294 - NullPointerException at org.openide.text.UndoRedoManager.editToBeUndoneRedone - partial fix (in openide.text). Changeset: 582fe89d41b3 Author: Jan Becicka <jbecicka@netbeans.org> Date: 2012-04-13 16:16 Message: Issue #210294 - NullPointerException at org.openide.text.UndoRedoManager.editToBeUndoneRedone Integrated into 'main-golden', will be available in build *201204140400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/582fe89d41b3 User: Jan Becicka <jbecicka@netbeans.org> Log: Issue #210294 - NullPointerException at org.openide.text.UndoRedoManager.editToBeUndoneRedone Product Version: NetBeans IDE 7.1.2 (Build 201204101705) Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21 System: Linux version 3.0.0-17-generic running on i386; UTF-8; en_US (nb) Verified, works for me now. Thanks :) . |