Issue Details (XML | Word | Printable)

Key: EL_SPEC-9
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: dougd
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

ELProcessor.defineFunction methods do not check for null args...

Created: 05/Nov/12 05:54 PM   Updated: 20/Feb/13 07:44 PM   Resolved: 20/Feb/13 07:44 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified



Participants: dougd and kchung

 Description  « Hide

API documentation states for both of the defineFunction methods that a NullPointerException should be thrown if any arg is null. Niether on of the methods looks to be testing for null args.

Example below.

public void defineFunction(String prefix, String function, Method method) {

if (prefix == null || function == null || method == null) { <-- need to add something like this. throw new NullPointerException(); }

if (function.equals("")) { function = method.getName(); }
elManager.mapFunction(prefix, function, method);

kchung added a comment - 20/Feb/13 07:44 PM


Note the spec has also been modified to also throw a NoSuchMethodException if the method is not static. See the javadocs for detailed.