Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Complete
-
5.1 GA
-
None
Description
Object payload = list; if (list.isEmpty()) { return null; } if (list.size() == 1) { payload = list.get(0); } return payload;
If a select query is performed and maxRows>1 we should always return a List or null rather than getting the first element.
maxRows>1 implies the application is expecting a List and shouldn't have to check the payload type.