Cast database results to Number, not Integer
--------------------------------------------
Key: ROL-1410
URL:
http://opensource.atlassian.com/projects/roller/browse/ROL-1410
Project: Roller
Issue Type: Bug
Components: Database Access & Data Model
Affects Versions: 3.1
Reporter: David Johnson
Assignee: Roller Unassigned
>From an email on roller-user mailing list (see below), we see that some users
>are running into problems because we sometimes cast numeric results from
>database to Integer. When the result is actually a Long, that causes a
>problem. We should instead cast to to the more generic Number class, which
>will work for Integers, Longs and other types of numbers.
> ERROR HibernateUserManagerImpl:getWeblogHandleLetterMap - Getting
> weblog letter map
> java.lang.ClassCastException: java.lang.Long
> at
> org.apache.roller.business.hibernate.HibernateUserManagerImpl.getWeblogH
> andleLetterMap(HibernateUserManagerImpl.java:885)
> at
> org.apache.roller.ui.rendering.model.SiteModel.getWeblogHandleLetterMap(
> SiteModel.java:259)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira