diff --git a/classpath/java/lang/Class.java b/classpath/java/lang/Class.java index 551bd710d8..0abf34eb02 100644 --- a/classpath/java/lang/Class.java +++ b/classpath/java/lang/Class.java @@ -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 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 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 signers = new HashMap(); } }