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 121579 - Code Completion: NPE on locked directory
Summary: Code Completion: NPE on locked directory
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-09 14:18 UTC by soldatov
Modified: 2007-11-19 15:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch (1.22 KB, patch)
2007-11-14 18:33 UTC, Vladimir Voskresensky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2007-11-09 14:18:29 UTC
Steps:
- Create project
- Create C or C++ file
- Type '#include </home/ai155158/>' in file (I have not permission to read files from this directory)
- Press Ctrl-space after '/'
==>NPE

java.lang.NullPointerException
	at
org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionQuery.addFolderItems(CsmIncludeCompletionQuery.java:114)
	at org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionQuery.query(CsmIncludeCompletionQuery.java:66)
	at
org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionProvider$Query.getItems(CsmIncludeCompletionProvider.java:226)
	at
org.netbeans.modules.cnd.completion.includes.CsmIncludeCompletionProvider$Query.query(CsmIncludeCompletionProvider.java:146)
	at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 1 Vladimir Voskresensky 2007-11-09 15:11:13 UTC
fixed
- check for null

cvs log:
Checking in CsmIncludeCompletionQuery.java;
/shared/data/ccvs/repository/cnd/completion/src/org/netbeans/modules/cnd/completion/includes/CsmIncludeCompletionQuery.java,v
 <--  CsmIncludeCompletionQuery.java
new revision: 1.12; previous revision: 1.11
done
Comment 2 Alexander Pepin 2007-11-13 16:16:28 UTC
verified in trunk build 20071113
Comment 3 Jesse Grodnik 2007-11-14 15:35:11 UTC
Following high resistance process ...
Comment 4 Vladimir Kvashin 2007-11-14 18:33:03 UTC
I reviewed the fix.
I believe it is correct and safe.
Comment 5 Vladimir Voskresensky 2007-11-14 18:33:38 UTC
Created attachment 52994 [details]
proposed patch
Comment 6 Vladimir Voskresensky 2007-11-16 12:53:27 UTC
cvs commit into release60:
Checking in CsmIncludeCompletionQuery.java;
/shared/data/ccvs/repository/cnd/completion/src/org/netbeans/modules/cnd/completion/includes/CsmIncludeCompletionQuery.java,v
 <--  CsmIncludeCompletionQuery.java
new revision: 1.11.2.1; previous revision: 1.11
done
Comment 7 Alexander Pepin 2007-11-19 15:15:57 UTC
verified in RC2 candidate build