harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Wilson (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6277) Timer's finalizer throws an NPE if the Timer wasn't constructed properly
Date Mon, 20 Jul 2009 21:43:14 GMT
Timer's finalizer throws an NPE if the Timer wasn't constructed properly
------------------------------------------------------------------------

                 Key: HARMONY-6277
                 URL: https://issues.apache.org/jira/browse/HARMONY-6277
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M10
         Environment: SVN Revision: 794879
            Reporter: Jesse Wilson
            Priority: Minor
         Attachments: Timer_newFinalizer.patch

The following call creates a Timer with no associated thread:
  new Timer(null, true);
When that timer is finalized, it's finalization helper object fails with a NullPointerException,
because there's no Thread assigned to impl.

The attached patch only initializes the finalization helper if the thread is created successfully.
Unfortunately I couldn't come up with a reasonable test case for this. In Android, exceptions
that occur during finalization result in stacktraces in the system log, which is how I detected
this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message