Here is some code I write to parse a 3339 time that I get back from
Google's gData:

                        try
                        {
                                Log.d("setUpdated", newTime );

                                Time time = new Time();
                                if( time.parse3339( newTime ) )
                                {
                                        this.mUpdated = time;
                                }
                        }
                        catch( android.util.TimeFormatException ex )
                        {
                                ex.printStackTrace();
                        }

Here is some of the log output from LogCat:

setUpdated   2010-01-07T20:26:29.000Z
setUpdated   2010-01-07T20:26:36.000Z
setUpdated   2010-01-07T20:26:22.000Z
setUpdated   2010-01-

Then it crashes because of a TimeFormatException.  The times are
coming from the gData calendar API so it is surprising that it returns
a bad time in only one case.  However, that is not the problem.

Notice that I said that it CRASHES because of a TimeFormatException,
not that it THROWS a TimeFormatException.  I said that because it
doesnt actually throw the exception!  If I put a breakpoint on the
stack trace line the debugger never gets there.  if I put a Log.d
there it doesnt display.  If i change the catch to an Exception it
still never gets there.  However, dalvikvm clearly outputs the
TimeFormatException and its stack trace to LogCat.  (I'd post it here
but you cant copy-paste from LogCat).

This leads me to believe that there is a bug in
android.text.format.Time.parse3339() where it crashes before it has
the opportunity to throw the exception it just logged!

Has anyone else seen this?  This is using Android 2.0.  Is it known
and fixed in 2.0.1?  Is there a way to report this to the android
devs?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to