move OpenJDK.getProtectionDomain into Classes.java

This way, apps can access the CodeSource of a class whether they're
using the OpenJDK class library or the Avian one.
This commit is contained in:
Joel Dice
2014-02-26 13:39:05 -07:00
parent d95a8a9626
commit 0c298eb513
5 changed files with 26 additions and 56 deletions

View File

@ -596,8 +596,6 @@ public final class Class <T> implements Type, AnnotatedElement {
}
public ProtectionDomain getProtectionDomain() {
Permissions p = new Permissions();
p.add(new AllPermission());
return new ProtectionDomain(null, p);
return Classes.getProtectionDomain(vmClass);
}
}