History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: STS-290
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Tim Fennell
Reporter: Andy
Votes: 0
Watchers: 0
Operations

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

Formatter needed for anonymous-inner-class Enum types to ensure name() is used to turn enums into Strings

Created: 23/Oct/06 01:09 AM   Updated: 13/Mar/07 04:33 AM
Component/s: Formatting
Affects Version/s: Release 1.4.1
Fix Version/s: Release 1.4.2


 Description  « Hide
In Stripes 1.4.1, DefaultFormatterFactory doesn't recognize enums of the following format:

enum Xxx {
Aaa { public int Mmm() { return 1; } },
Bbb { public int Mmm() { return 2; } };
public abstract int Mmm();
}

The following patch to DefaultFormatterFactory should fix it.

- else if (clazz.isEnum()) {
+ else if (Enum.class.isAssignableFrom(clazz)) {

 All   Comments   Change History      Sort Order:
Tim Fennell [24/Oct/06 07:08 PM]
I've commited the suggested change.