Author: dkulp
Date: Thu Apr 15 03:21:02 2010
New Revision: 934275
URL: http://svn.apache.org/viewvc?rev=934275&view=rev
Log:
Merged revisions 934268 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r934268 | dkulp | 2010-04-14 23:03:35 -0400 (Wed, 14 Apr 2010) | 1 line
Don't call deleteOnExit during shutdown
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
Propchange: cxf/branches/2.2.x-fixes/
('svn:mergeinfo' removed)
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java?rev=934275&r1=934274&r2=934275&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
(original)
+++
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
Thu Apr 15 03:21:02 2010
@@ -79,7 +79,7 @@ public final class FileUtils {
Thread hook = new Thread() {
@Override
public void run() {
- removeDir(defaultTempDir);
+ removeDir(defaultTempDir, true);
}
};
Runtime.getRuntime().addShutdownHook(hook);
@@ -125,6 +125,9 @@ public final class FileUtils {
}
public static void removeDir(File d) {
+ removeDir(d, false);
+ }
+ private static void removeDir(File d, boolean inShutdown) {
String[] list = d.list();
if (list == null) {
list = new String[0];
@@ -133,15 +136,18 @@ public final class FileUtils {
String s = list[i];
File f = new File(d, s);
if (f.isDirectory()) {
- removeDir(f);
+ removeDir(f, inShutdown);
} else {
- delete(f);
+ delete(f, inShutdown);
}
}
- delete(d);
+ delete(d, inShutdown);
}
public static void delete(File f) {
+ delete(f, false);
+ }
+ public static void delete(File f, boolean inShutdown) {
if (!f.delete()) {
if (isWindows()) {
System.gc();
@@ -151,7 +157,7 @@ public final class FileUtils {
} catch (InterruptedException ex) {
// Ignore Exception
}
- if (!f.delete()) {
+ if (!f.delete() && !inShutdown) {
f.deleteOnExit();
}
}
Modified:
cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java?rev=934275&r1=934274&r2=934275&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
Thu Apr 15 03:21:02 2010
@@ -139,6 +139,7 @@ public class SimpleAuthorizingIntercepto
}
private static class TestService {
+ @SuppressWarnings("unused")
public void echo() {
}