From e93459bdb976ec98abfe03f26652005fd20d2caa Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Fri, 4 Feb 2011 21:33:39 +0000 Subject: [PATCH] Fix some 1.6isms and add a missing @Override git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6478 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../java/com/threerings/presents/net/AESAuthRequest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/threerings/presents/net/AESAuthRequest.java b/src/main/java/com/threerings/presents/net/AESAuthRequest.java index 6e4030c03..f1ac6fc4d 100644 --- a/src/main/java/com/threerings/presents/net/AESAuthRequest.java +++ b/src/main/java/com/threerings/presents/net/AESAuthRequest.java @@ -84,7 +84,9 @@ public class AESAuthRequest extends AuthRequest try { _contents = SecureUtil.getAESCipher(Cipher.DECRYPT_MODE, _key).doFinal(_contents); } catch (GeneralSecurityException gse) { - throw new IOException("Failed to decrypt credentials", gse); + IOException ioe = new IOException("Failed to decrypt credentials"); + ioe.initCause(gse); + throw ioe; } ByteArrayInputStream byteIn = new ByteArrayInputStream(_contents); @@ -108,13 +110,16 @@ public class AESAuthRequest extends AuthRequest out.writeInt(encrypted.length); out.write(encrypted); } catch (GeneralSecurityException gse) { - throw new IOException("Failed to encrypt credentials", gse); + IOException ioe = new IOException("Failed to encrypt credentials"); + ioe.initCause(gse); + throw ioe; } } /** * Read in our encrypted contents. */ + @Override public void readObject (ObjectInputStream in) throws IOException, ClassNotFoundException {