[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2968) SimpleExpression.getTypedValues NullPointerException when ignoreCase and value==null
Anders Wallgren (JIRA)
noreply at atlassian.com
Mon Nov 26 19:49:56 EST 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anders Wallgren updated HHH-2968:
---------------------------------
Attachment: HHH-2968.patch
Patch to work around the bug.
> SimpleExpression.getTypedValues NullPointerException when ignoreCase and value==null
> ------------------------------------------------------------------------------------
>
> Key: HHH-2968
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2968
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.2.5
> Reporter: Martijn Brinkers
> Attachments: HHH-2968.patch
>
>
> If ignoreCase is true and value is null a NullPointerException is thrown because toString() is called without checking for null.
> public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)
> throws HibernateException {
> Object icvalue = ignoreCase ? value.toString().toLowerCase() : value;
> return new TypedValue[] { criteriaQuery.getTypedValue(criteria, propertyName, icvalue) };
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list