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 126590

Summary: NPE and wrong file created when copying java file
Product: versioncontrol Reporter: Jiri Skrivanek <jskrivanek>
Component: MercurialAssignee: issues@versioncontrol <issues>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: messages.log with mercurial logging.
proposed patch

Description Jiri Skrivanek 2008-02-04 08:00:44 UTC
NullPointerException is thrown and wrong file is created when you try to copy and refactor java file while userdir is in
mercurial repository. To reproduce:

- run IDE with usedir in Hg repository (e.g. main/myuserdir - this case is common when you run UI tests)
- "Changing..." task is running in progress bar
- create new java project
- call Copy action on Main.java node
- call 'Paste|Refactor Copy...' on javaapplication1 package node
- click Refactor in Copy Class dialog. It throws NPE and Main_1.java is created instead of Main1.java (see messages.log).

Product Version: NetBeans IDE Dev (Build 20080204054559)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Comment 1 Jiri Skrivanek 2008-02-04 08:04:49 UTC
Created attachment 55975 [details]
messages.log with mercurial logging.
Comment 2 Padraig Obriain 2008-02-05 13:45:10 UTC
I see this problem.
Comment 3 Padraig Obriain 2008-02-05 15:10:43 UTC
Created attachment 56078 [details]
proposed patch
Comment 4 Padraig Obriain 2008-02-05 15:14:29 UTC
changeset:   65902:e136840d83df
tag:         tip
user:        padraigob@netbeans.org
date:        Tue Feb 05 15:06:13 2008 +0000
files:       mercurial/src/org/netbeans/modules/mercurial/MercurialInterceptor.java
description:
126590: Do move immediately rather than in background.


Comment 5 Jiri Skrivanek 2008-02-06 13:43:26 UTC
Verified.