harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: svn commit: r474705 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java
Date Tue, 14 Nov 2006 13:27:00 GMT
Richard,

Can you also convert Tony's test into a regression testcase?

Regards,
Tim

liangyx@apache.org wrote:
> Author: liangyx
> Date: Tue Nov 14 00:52:10 2006
> New Revision: 474705
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=474705
> Log:
> Apply patch for HARMONY-2156 ([classlib][luni]file.deleteOnExit is not able to delete
parent directroy even if the sub directory is marked as deleteonexit also)
> 
> Modified:
>     incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java
> 
> Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java
> URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java?view=diff&rev=474705&r1=474704&r2=474705
> ==============================================================================
> --- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java
(original)
> +++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/util/DeleteOnExit.java
Tue Nov 14 00:52:10 2006
> @@ -35,6 +35,12 @@
>  	}
>  
>  	public static void deleteOnExit() {
> +        java.util.Collections.sort(deleteList,
> +                new java.util.Comparator<String>() {
> +                    public int compare(String s1, String s2) {
> +                        return s2.length() - s1.length();
> +                    }
> +                });
>  		for (int i = 0; i < deleteList.size(); i++) {
>  			String name = deleteList.elementAt(i);
>  			new File(name).delete();
> 
> 
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Mime
View raw message