Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 593 invoked from network); 4 Aug 2006 19:02:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Aug 2006 19:02:54 -0000 Received: (qmail 73695 invoked by uid 500); 4 Aug 2006 19:02:54 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 73668 invoked by uid 500); 4 Aug 2006 19:02:53 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 73562 invoked by uid 99); 4 Aug 2006 19:02:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2006 12:02:53 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2006 12:02:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EF9DC7142B7 for ; Fri, 4 Aug 2006 19:00:15 +0000 (GMT) Message-ID: <20129506.1154718015979.JavaMail.jira@brutus> Date: Fri, 4 Aug 2006 12:00:15 -0700 (PDT) From: "Tim Ellison (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Closed: (HARMONY-963) java.util.Timer: purge() throws NPE on empty timer In-Reply-To: <24066421.1153743616456.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-963?page=all ] Tim Ellison closed HARMONY-963. ------------------------------- Verified by Anton. > java.util.Timer: purge() throws NPE on empty timer > -------------------------------------------------- > > Key: HARMONY-963 > URL: http://issues.apache.org/jira/browse/HARMONY-963 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: Windows XP professional > Reporter: Anton Luht > Assigned To: Tim Ellison > Priority: Trivial > Attachments: patch.txt > > > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r424964, (Jul 24 2006), Windows/ia32/msvc 1310, debug build > http://incubator.apache.org/harmony > Spec says: > public int purge() > Removes all cancelled tasks from this timer's task queue > Returns: > the number of tasks removed from the queue. > The following code: > import java.util.Timer; > public class Test{ > public static void main(String args[]) { > try { > Timer localTimer = new Timer("aaa", false); > System.err.println("Timer.purge()= "+localTimer.purge()); > System.err.println("PASSED"); > } catch(Exception e) { > e.printStackTrace(); > System.err.println("FAILED"); > } > System.exit(0); > } > } > prints > java.lang.NullPointerException > at java.util.Timer$TimerImpl.purge(Timer.java:290) > at java.util.Timer.purge(Timer.java:346) > at Test.main(Test.java:7) > FAILED > on Harmony > and prints > Timer.purge()= 0 > PASSED > on RI > Please see the patch for JUnit test and classlib code attached -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira