[EL_SPEC-10] API doc errors for javax.el.TypeConverter Created: 14/Nov/12  Updated: 20/Feb/13  Resolved: 20/Feb/13

Status: Resolved
Project: el-spec
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: dougd Assignee: kchung
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

N/A



 Description   

Here is the Example that we have provided in the API docs.

ELProcessor elp = new ELProcessor();
elp.getELManager().addELResolver(new TypeConverter() {
Object convertToType(ELContext context, Object obj, Class type) {
if (obj instanceof String) && type == MyDate.class)

{ context.setPropertyResoved(obj, type); return (obj == null)? null: new MyDate(obj.toString()); }

return null;
}
};

Below I have put the various fixes in spelling and syntax.

ELProcessor elp = new ELProcessor();
elp.getELManager().addELResolver(new TypeConverter() {
Object convertToType(ELContext context, Object obj, Class type) {
if ((obj instanceof String) && type == MyDate.class)

{ <------ Added missing "(" context.setPropertyResolved(obj, type); <------ Fixed Spelling on Method call. return (obj == null)? null: new MyDate(obj.toString()); }

return null;
}
};



 Comments   
Comment by kchung [ 20/Feb/13 ]

Fixed.

Generated at Wed Jul 29 10:28:42 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.