Bug 190932 - FileFilter throws uncaught NullPointer exception
Summary: FileFilter throws uncaught NullPointer exception
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.3 RC4   Edit
Assignee: Platform-Update-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-06-04 22:24 EDT by James D. Miles CLA
Modified: 2007-06-06 17:47 EDT (History)
0 users

See Also:
dj.houghton: review+
john.arthorne: review+
jeffmcaffer: review+


Attachments
Fix NullPointerException (955 bytes, patch)
2007-06-04 22:51 EDT, James D. Miles CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James D. Miles CLA 2007-06-04 22:24:56 EDT
If the permissions.properties file contains something like
permissions.executable=test_exA/*
eclipse will throw an uncaught NullPointerException.

The return from getFileExtension is not handled correctly. In the above case it will return null.
I will post a patch in a bit.
Comment 1 James D. Miles CLA 2007-06-04 22:51:55 EDT
Created attachment 70064 [details]
Fix NullPointerException
Comment 2 Dejan Glozic CLA 2007-06-05 07:46:40 EDT
James, this seems simple but is it really necessary? Can you formulate permissions in a way to avoid the NPE?
Comment 3 James D. Miles CLA 2007-06-05 08:44:00 EDT
Of course it is possible to formulate permissions to avoid this. The problem is when a plugin developer does this. It creates exceptions that are hard to debug since the exception isn't caught.
Comment 4 Dejan Glozic CLA 2007-06-05 09:54:21 EDT
Recommended for fixing in RC4 - a well encapsulated fix for an NPE with high value/risk ratio.
Comment 5 John Arthorne CLA 2007-06-05 10:52:18 EDT
Patch looks good.
Comment 6 Dejan Glozic CLA 2007-06-06 17:47:21 EDT
Released.