You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/08/04 21:00:15 UTC
[jira] Closed: (HARMONY-963) java.util.Timer: purge() throws NPE on
empty timer
[ 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