[ 
https://issues.apache.org/jira/browse/TAP5-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Drobiazko updated TAP5-1043:
---------------------------------

    Summary: PropertyDisplayBlocks causes NullPointerException when property of 
type Calendar is null  (was: Beans with null Calendar values throw exceptions 
(fix included))

> PropertyDisplayBlocks causes NullPointerException when property of type 
> Calendar is null
> ----------------------------------------------------------------------------------------
>
>                 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
>            Assignee: Igor Drobiazko
>
> 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