# HG changeset patch # User ssadetsky # Date 1437461493 -10800 # Node ID 6890dfde0ed196a64fc42c1578f1a02ad4f74e8e # Parent 7be531b4df44f1a3a5c322e9e0c3167229f414d4 8062728: [PIT] Test closed/... fails for Windows only Reviewed-by: alexsch, serb diff -r 7be531b4df44 -r 6890dfde0ed1 jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java --- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java Tue Jul 21 09:35:04 2015 +0300 +++ b/jdk/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) () -> { + return SystemFlavorMap.class.getResourceAsStream( + "/sun/datatransfer/resources/flavormap.properties"); + }); if (is == null) { throw new InternalError("Default flavor mapping not found"); }