Beans with null Calendar values throw exceptions (fix included)
---------------------------------------------------------------

                 Key: TAP5-1043
                 URL: https://issues.apache.org/jira/browse/TAP5-1043
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.2.0
            Reporter: Pierce Wetter


Using a Bean Display Grid with a bean with a null calendar throws a null 
pointer exception. 

org.apache.tapestry5.corelib.pages.PropertyDisplayBlocks.getCalendarDate(PropertyDisplayBlocks.java:56)

Fix is trivial, simple check that the value is not null before calling 
getTime(). 

public Date getCalendarDate() 
    {
        Calendar calendar = (Calendar) context.getPropertyValue();
        if (calendar!=null)
        {
                return calendar.getTime();
        }
        return null;
     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to