Tapestry
  1. Tapestry
  2. TAPESTRY-2260

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.12
    • Component/s: tapestry-hibernate
    • Labels:
      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development