mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
implement Class.{get|set}Signers
This commit is contained in:
parent
e18ab49f4d
commit
7050448ec5
@ -22,6 +22,8 @@ import java.lang.annotation.Annotation;
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.security.ProtectionDomain;
|
||||
import java.security.Permissions;
|
||||
import java.security.AllPermission;
|
||||
@ -456,7 +458,7 @@ public final class Class <T> implements Type, GenericDeclaration {
|
||||
}
|
||||
|
||||
public Object[] getSigners() {
|
||||
throw new UnsupportedOperationException();
|
||||
return Static.signers.get(this);
|
||||
}
|
||||
|
||||
public Annotation[] getDeclaredAnnotations() {
|
||||
@ -503,6 +505,12 @@ public final class Class <T> implements Type, GenericDeclaration {
|
||||
|
||||
// for GNU Classpath compatibility:
|
||||
void setSigners(Object[] signers) {
|
||||
throw new UnsupportedOperationException();
|
||||
if (signers != null && signers.length > 0) {
|
||||
Static.signers.put(this, signers);
|
||||
}
|
||||
}
|
||||
|
||||
private static class Static {
|
||||
public static final Map<Class,Object[]> signers = new HashMap();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user