Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.0-JSR-5
-
Fix Version/s: 1.1-beta-2
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
GroovyRowResult.getProperty always raise exception when field value is null
I offer implementation of getProperty(String property):
public Object getProperty(String property) {
try {
Object value = result.get(property);
if (value==null && !result.containsKey(property)) {
// with some databases/drivers, the columns names are stored uppercase.
String propUpper = property.toUpperCase();
value = result.get(propUpper);
if (value==null && !result.containsKey(propUpper))
throw new MissingPropertyException(property, GroovyRowResult.class);
}
return(value);
}
catch (Exception e) {
throw new MissingPropertyException(property, GroovyRowResult.class, e);
}
}
same as issue
GROOVY-1296( http://jira.codehaus.org/browse/GROOVY-1296 )GROOVY-1296( http://jira.codehaus.org/browse/GROOVY-1296 )