This page was last modified 12:07, 23 August 2007.
KIJ000586 - WMA implementation for getTimestamp() returns always null
From Forum Nokia Wiki
WMA implementation for getTimestamp() returns always null
|
KIJ000586
|
Overview
| -
|
Reported against
| S60 3rd Edition
|
Category
| Java
|
Subcategory
| Wireless Messaging API
|
Date identified
| February 22, 2007
|
Symptoms
| -
|
Detailed description
| JSR-205 defines a method getTimestamp(), which is applied to a message and it indicates when the message has been sent (see JSR-205, page 16). According to JSR-205, this method might return "null if the timestamp is not set or if the time information is not available in the underlying protocol message". However, the S60 WMA implementation returns always null as when calling getTimestamp() and this might create problems for MIDlets if the result of the getTimestamp() method is not checked against the null value.
|
How to reproduce
| Call getTimestamp() for a received MMS. It will return null.
|
Solution
| This problem is corrected in S60 3rd Edition, FP1. Note that Java applications should be prepared for the situation when the getTimestamp() function returns null (the most common mistake found in MIDlets is that they simply call the getTimestamp().toString() method without checking the result of the getTimestamp() method against null in beforehand).
|