You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Igor Drobiazko (JIRA)" <ji...@apache.org> on 2010/03/05 23:15:27 UTC
[jira] Closed: (TAP5-1043) PropertyDisplayBlocks causes
NullPointerException when property of type Calendar is null
[ https://issues.apache.org/jira/browse/TAP5-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Drobiazko closed TAP5-1043.
--------------------------------
Resolution: Fixed
Fix Version/s: 5.2.0
> 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
> Fix For: 5.2.0
>
>
> 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.