Uploaded image for project: 'Hibernate ORM'
  1. HHH-1455

setParameterList() throws an NPE when the list contains null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Rejected
    • Affects versions: 3.1.1
    • Fix versions: None
    • Components: hibernate-core
    • Labels:
      None
    • Environment:
      linux redhat, hibernate 3.0.5, oracle
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      When using an IN(:param) query, it is currently not possible to have the list set by setParameterList() contain null values.
      The folowing exception is thrown:

      java.lang.NullPointerException
      at org.hibernate.proxy.HibernateProxyHelper.getClassWithoutInitializingProxy(HibernateProxyHelper.java:23)
      at org.hibernate.impl.AbstractQueryImpl.guessType(AbstractQueryImpl.java:454)
      at org.hibernate.impl.AbstractQueryImpl.setParameterList(AbstractQueryImpl.java:538)

      It seems it assumes a not-null value, but it is perfectly sensible to query for something like where xxx.id in (1, 2, null). See HB-774 Closed for the comment by Gavin.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: