harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Luht (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-963) java.util.Timer: purge() throws NPE on empty timer
Date Fri, 04 Aug 2006 16:53:15 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-963?page=comments#action_12425790 ] 
            
Anton Luht commented on HARMONY-963:
------------------------------------

verified on

svn = r428772, (Aug  4 2006), Windows/ia32/msvc 1310, debug build

> 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

        

Mime
View raw message