8062728: [PIT] Test closed/... fails for Windows only

Reviewed-by: alexsch, serb
This commit is contained in:
Semyon Sadetsky 2015-07-21 09:51:33 +03:00
parent 1564b678e7
commit 41e7243833

View File

@ -33,6 +33,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.ref.SoftReference;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@ -200,7 +202,11 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
}
isMapInitialized = true;
InputStream is = SystemFlavorMap.class.getResourceAsStream("/sun/datatransfer/resources/flavormap.properties");
InputStream is = AccessController.doPrivileged(
(PrivilegedAction<InputStream>) () -> {
return SystemFlavorMap.class.getResourceAsStream(
"/sun/datatransfer/resources/flavormap.properties");
});
if (is == null) {
throw new InternalError("Default flavor mapping not found");
}