Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2260

Null relationships cause an NPE inside Hibernate when being value encoded by RadioGroup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 5.0.11
    • 5.0.12
    • tapestry-hibernate
    • None

    Description

      If a property is null and that property is value encoded (perhaps due to a RadioGroup), then an NPE occurs:

      1. sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36)
      2. sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
      3. java.lang.reflect.Field.get(Field.java:357)
      4. org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:32)
      5. org.apache.tapestry.internal.hibernate.HibernateEntityValueEncoder.toClient(HibernateEntityValueEncoder.java:46)
      6. org.apache.tapestry.corelib.components.RadioGroup.setupRender(RadioGroup.java:146)
      7. org.apache.tapestry.corelib.components.RadioGroup.setupRender(RadioGroup.java)

      The ValueEncoder should check for null, and return null.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: