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 156919

Summary: NullPointerException at org.netbeans.spi.project.support.ant.PathMatcher.matches
Product: projects Reporter: dcherk <dcherk>
Component: Ant FreeformAssignee: Milan Kubec <mkubec>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=145245
Issue Type: DEFECT Exception Reporter: 145245
Attachments: stacktrace

Description dcherk 2009-01-15 21:22:49 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows XP, 5.1, x86

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.spi.project.support.ant.PathMatcher.matches(PathMatcher.java:183)
        at org.netbeans.modules.ant.freeform.ui.FolderNodeFactory$GroupDataFilter.acceptFileObject(FolderNodeFactory.java:281)
        at org.openide.loaders.FolderChildren$1R.run(FolderChildren.java:157)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Comment 1 dcherk 2009-01-15 21:22:57 UTC
Created attachment 75869 [details]
stacktrace
Comment 2 Milan Kubec 2009-05-05 10:09:16 UTC
Please provide more details how the issue happened. Thanks.
Comment 3 Jesse Glick 2009-05-05 17:11:47 UTC
A dev build would not have gotten this far:

            assert path != null : fo + " not in " + root;  //NOI18N

Not sure how path would be null, but perhaps it is a race condition with FolderChildren. I would recommend that this be
changed to

  if (path == null) {
    return false;
  }
Comment 4 Milan Kubec 2009-05-06 08:18:31 UTC
I know about the assert and I was thinking about same solution, but wanted to know how to reproduce to find out why null.

http://hg.netbeans.org/core-main/rev/b7c0d92dbf06
Comment 5 Quality Engineering 2009-05-07 08:08:35 UTC
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b7c0d92dbf06
User: Milan Kubec <mkubec@netbeans.org>
Log: #156919: avoiding NPE