mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Temp dir cache reset came back to PlatformTestCase
This commit is contained in:
@@ -563,13 +563,13 @@ public abstract class PlatformTestCase extends UsefulTestCase implements DataPro
|
||||
|
||||
private static void setTmpDir(String path) {
|
||||
System.setProperty("java.io.tmpdir", path);
|
||||
FileUtil.resetCanonicalTempPathCache();
|
||||
|
||||
try {
|
||||
Class<File> ioFile = File.class;
|
||||
Field field = ioFile.getDeclaredField("tmpdir");
|
||||
|
||||
field.setAccessible(true);
|
||||
field.set(ioFile, null);
|
||||
FileUtil.resetCanonicalTempPathCache();
|
||||
}
|
||||
catch (NoSuchFieldException ignore) {
|
||||
// field was removed in JDK 1.6.0_12
|
||||
|
||||
Reference in New Issue
Block a user