diff options
author | Mark Wielaard <mark@klomp.org> | 2007-01-21 17:05:23 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2007-01-21 17:05:23 +0000 |
commit | 58122561536793f2c2655da521de5d69792d9899 (patch) | |
tree | 436fb595fbbc11b4c6e4042c071f48c983d8fa5b /java | |
parent | 17e6b549de00dd895aaf8f35c5ca720f42de67d1 (diff) | |
download | classpath-58122561536793f2c2655da521de5d69792d9899.tar.gz |
* java/security/SecureClassLoader.java (defineClass): Method returns
Class<?>.
* java/security/SignatureSpi.java (engineUpdate(ByteBuffer):
Does not throw SignatureException. Chain SignatureException inside
IllegalStateException.
Diffstat (limited to 'java')
-rw-r--r-- | java/security/SecureClassLoader.java | 2 | ||||
-rw-r--r-- | java/security/SignatureSpi.java | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/java/security/SecureClassLoader.java b/java/security/SecureClassLoader.java index dfc1758b5..f683f9a70 100644 --- a/java/security/SecureClassLoader.java +++ b/java/security/SecureClassLoader.java @@ -99,7 +99,7 @@ public class SecureClassLoader extends ClassLoader * * @since 1.5 */ - protected final Class defineClass(String name, ByteBuffer b, CodeSource cs) + protected final Class<?> defineClass(String name, ByteBuffer b, CodeSource cs) { return super.defineClass(name, b, getProtectionDomain(cs)); } diff --git a/java/security/SignatureSpi.java b/java/security/SignatureSpi.java index 3b46815ec..80ecbfd44 100644 --- a/java/security/SignatureSpi.java +++ b/java/security/SignatureSpi.java @@ -136,16 +136,23 @@ public abstract class SignatureSpi * bytes of the given buffer. * * @param input The input buffer. - * @throws SignatureException + * @throws IllegalStateException if the engine is not properly initialized. */ - protected void engineUpdate(ByteBuffer input) throws SignatureException + protected void engineUpdate(ByteBuffer input) { byte[] buf = new byte[4096]; while (input.hasRemaining()) { int l = Math.min(input.remaining(), buf.length); input.get(buf, 0, l); - engineUpdate(buf, 0, l); + try + { + engineUpdate(buf, 0, l); + } + catch (SignatureException se) + { + throw new IllegalStateException(se); + } } } |