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 129781

Summary: HgUtils.isIgnored passes null to ProjectManager.isProject
Product: versioncontrol Reporter: Jesse Glick <jglick>
Component: MercurialAssignee: issues@versioncontrol <issues>
Status: RESOLVED FIXED    
Severity: blocker Keywords: RANDOM, TEST
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://deadlock.netbeans.org/hudson/job/trunk/997/testReport/org.netbeans.test.xslt/AcceptanceTestCase/createXSLT/
Issue Type: DEFECT Exception Reporter:
Attachments: proposed patch

Description Jesse Glick 2008-03-11 14:41:33 UTC
Observed in validation tests:

java.lang.IllegalArgumentException: Attempted to pass a null directory to isProject
	at org.netbeans.api.project.ProjectManager.isProject(ProjectManager.java:406)
	at org.netbeans.modules.mercurial.util.HgUtils.isIgnored(HgUtils.java:320)
	at org.netbeans.modules.mercurial.util.HgUtils.isIgnored(HgUtils.java:303)
	at org.netbeans.modules.mercurial.FileStatusCache.scanFolder(FileStatusCache.java:777)
	[...]
Comment 1 Jesse Glick 2008-03-11 14:41:58 UTC
No apparently related changes => probably random.
Comment 2 Padraig Obriain 2008-03-11 14:56:18 UTC
            if (projectManager.isProject(FileUtil.toFileObject(file))) {

is line 320.
Comment 3 Padraig Obriain 2008-03-11 14:57:11 UTC
FileUtil.toFileObject returns null if the file does not exist or there is no URLMapper available to convert it
Comment 4 Padraig Obriain 2008-03-11 15:20:02 UTC
Created attachment 58159 [details]
proposed patch
Comment 5 Padraig Obriain 2008-03-11 15:27:44 UTC
Patch pushed in 31203c5c0f19.
Comment 6 Jesse Glick 2008-03-11 16:03:15 UTC
You must set the Target Milestone when closing any issue as FIXED.
Comment 7 Ondrej Vrabec 2009-05-12 10:14:24 UTC
*** Issue 164770 has been marked as a duplicate of this issue. ***