зеркало из https://github.com/mono/ikvm-fork.git
Disallow Unsafe.getUnsafe() from being called via reflection (for JDK compatibility).
This commit is contained in:
Родитель
05b0aa6977
Коммит
7e3aaea45f
|
@ -58,6 +58,9 @@ public class Reflection {
|
||||||
fieldFilterMap = map;
|
fieldFilterMap = map;
|
||||||
|
|
||||||
methodFilterMap = new HashMap<Class,String[]>();
|
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>
|
/** Returns the class of the method <code>realFramesToSkip</code>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче