changeset 12464:dac9d8d26961

8062728: [PIT] Test closed/... fails for Windows only Reviewed-by: alexsch, serb
author ssadetsky
date Tue, 21 Jul 2015 09:51:33 +0300
parents 6f6efb9e933e
children 78452df4fb79 feb63ba0f961
files src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Tue Jul 21 09:35:04 2015 +0300
+++ b/src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Tue Jul 21 09:51:33 2015 +0300
@@ -33,6 +33,8 @@
 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 @@
         }
         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");
         }