Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339553 - [server] Missing null check in GitUtils#getGitDir
Summary: [server] Missing null check in GitUtils#getGitDir
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 12:02 EST by John Arthorne CLA
Modified: 2011-09-01 11:41 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2011-03-10 12:02:59 EST
See:

		IFileStore fileStore = NewFileServlet.getFileStore(p, authority);
		File file = fileStore.toLocalFile(EFS.NONE, null);

getFileStore can return null, but it is not checked. I think it just needs:

if (fileStore == null)
  return null;

Also it would be helpful for the method javadoc to say it can return null (even if this is not API).
Comment 1 Tomasz Zarna CLA 2011-03-14 07:24:59 EDT
Fixed with 3a185c15d207c81f2fc81e1caee5d254c28d98aa.