diff --git a/src/main/java/com/google/crypto/tink/JsonKeysetReader.java b/src/main/java/com/google/crypto/tink/JsonKeysetReader.java index 2bd68988b..3baa18085 100644 --- a/src/main/java/com/google/crypto/tink/JsonKeysetReader.java +++ b/src/main/java/com/google/crypto/tink/JsonKeysetReader.java @@ -163,7 +163,7 @@ public Keyset read() throws IOException { try { return keysetFromJson( JsonParser.parse(new String(Util.readAll(inputStream), UTF_8)).getAsJsonObject()); - } catch (JsonParseException | IllegalStateException e) { + } catch (JsonParseException | IllegalStateException | UnsupportedOperationException e) { throw new IOException(e); } finally { if (inputStream != null) { @@ -177,7 +177,7 @@ public EncryptedKeyset readEncrypted() throws IOException { try { return encryptedKeysetFromJson( JsonParser.parse(new String(Util.readAll(inputStream), UTF_8)).getAsJsonObject()); - } catch (JsonParseException | IllegalStateException e) { + } catch (JsonParseException | IllegalStateException | UnsupportedOperationException e) { throw new IOException(e); } finally { if (inputStream != null) {