Disallow Unsafe.getUnsafe() from being called via reflection (for JDK compatibility).

This commit is contained in:
jfrijters 2012-08-30 08:52:55 +00:00
Родитель 05b0aa6977
Коммит 7e3aaea45f
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -58,6 +58,9 @@ public class Reflection {
fieldFilterMap = map;
methodFilterMap = new HashMap<Class,String[]>();
// [IKVM] to avoid initialization order issues, we actually add
// Unsafe.getUnsafe() here, instead of in Unsafe's class initializer
methodFilterMap.put(sun.misc.Unsafe.class, new String[] {"getUnsafe"});
}
/** Returns the class of the method <code>realFramesToSkip</code>