My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 850: gwtjsonrpc SqlTimestampDeserializer issue
2 people starred this issue and may be notified of changes. Back to list
Status:  Submitted
Owner:  ulrik.sj...@sonymobile.com
Closed:  Jun 2011


Sign in to add a comment
 
Reported by rafael.rabelosilva@sonyericsson.com, Feb 22, 2011
Affected Version:
gwtjsonrpc-1.2.3.jar


What steps will reproduce the problem?

1. If one gets Gson instance from JsonServlet.defaultGsonBuilder, 
SqlTimestampDeserializer will be the adapter to java.sql.Timestamp
class. SqlTimestampDeserializer.deserialize would parse timestamp string
using java.text.SimpleDateFormat. 

2. This makes a timestamp value to be
misunderstood. 

3. Code was compiled using java 1.6.0_20-b02.


What is the expected output? What do you see instead?
A java.sql.Timestamp instance was deserialized with wrong date/time values (with date difference of about 10 days, and also different time value).


Please provide any additional information below.
We could notice the problem is solved if the timestamp string is parsed using the JavaSqlTimestamp_JsonSerializer.parseTimestamp code.

There is discussion about this issue at http://groups.google.com/group/repo-discuss/browse_thread/thread/b4a99acbca6e2556 .

May 9, 2011
#1 sascha.s...@gmail.com
In the Mylyn Gerrit connector we solved the issue by wrapping JavaSqlTimestamp_JsonSerializer().fromJson into a custom deserializer. See http://git.eclipse.org/c/mylyn/org.eclipse.mylyn.reviews.git/commit/?id=1fb8eb4167a29d7c0f59ac40b3ceeb6212acb610
May 9, 2011
#2 rafael.rabelosilva@sonyericsson.com
Sasha, we agree it can be solved outside gwtjsonrpc. But it seemed it could be solved directly in gwtjsonrpc project. Our team has uploaded a fix proposal: https://review.source.android.com/#change,22771 .
May 20, 2011
Project Member #3 nas...@grainawi.org
(No comment was entered for this change.)
Status: Started
Owner: ulrik.sj...@sonymobile.com
Jun 13, 2011
#4 sop@google.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.2.2
Sign in to add a comment

Powered by Google Project Hosting