Use correct class loader for Runtime.load
Fix a bug discovered during code inspection. Use the correct class
loader for Runtime.load(); previously it was using the ClassLoader of
the caller's caller, not the ClassLoader of the caller as was intended.
Bug: 29452398
Change-Id: I609a3789aa58190427d8fd4c4ea2fc6b1cc8bd24
diff --git a/ojluni/src/main/java/java/lang/Runtime.java b/ojluni/src/main/java/java/lang/Runtime.java
index 61c2502..eb01061 100755
--- a/ojluni/src/main/java/java/lang/Runtime.java
+++ b/ojluni/src/main/java/java/lang/Runtime.java
@@ -868,7 +868,7 @@
*/
@CallerSensitive
public void load(String filename) {
- load0(VMStack.getStackClass2(), filename);
+ load0(VMStack.getStackClass1(), filename);
}
// Fixes b/25859957 regression. Depending on private methods is bad, mkay.