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 104813

Summary: NPE from UndoWatcher
Product: java Reporter: _ tboudreau <tboudreau>
Component: RefactoringAssignee: issues@java <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: messages.log

Description _ tboudreau 2007-05-25 09:46:31 UTC
Haven't seen this in the regular refactorings, but with my own, very often as
the refactoring preview is displayed, the following exception is thrown from a
background thread.  The line where it is thrown is:

UndoManager.getDefault().watch(extractCES(session.getRefactoringElements()), l);

I'm guessing this is some kind of race condition where the session object is not
yet initialized (unless UndoManager.getDefault() is returning null, which I doubt).




java.lang.NullPointerException
	at org.netbeans.modules.refactoring.spi.impl.UndoWatcher.watch(UndoWatcher.java:53)
	at
org.netbeans.modules.refactoring.spi.impl.ParametersPanel$8.run(ParametersPanel.java:332)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)
Comment 1 Jan Becicka 2007-06-18 14:24:52 UTC
Please attach whole messages.log
Comment 2 _ krystyna 2007-06-19 00:40:39 UTC
Also see this NPE when I attempt to refactor a Visual Web page1.java from the Files node.
Attaching my messages.log which contains the NPE stack. I had been refactoring all the Managed
Beans (successfully) from the Projects tab when I switched to the Files tab to refactor
the Page1.java page..

java.lang.NullPointerException
	at org.netbeans.modules.refactoring.spi.impl.UndoWatcher.watch(UndoWatcher.java:53)
	at org.netbeans.modules.refactoring.spi.impl.ParametersPanel$8.run(ParametersPanel.java:332)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)
Comment 3 _ krystyna 2007-06-19 00:42:09 UTC
Created attachment 43931 [details]
messages.log
Comment 4 Jan Becicka 2007-06-19 06:59:38 UTC
Probably side effect of 107051

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