From d7824ddd395cdcf2aeaaeb33f3aa3670075c122c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Galder=20Zamarren=CC=83o?= Date: Thu, 14 Dec 2017 11:29:14 +0100 Subject: [PATCH] CacheClient.stop() should wrap exceptions in IOException #136 --- .../src/main/java/org/jsr107/tck/support/CacheClient.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cache-tests/src/main/java/org/jsr107/tck/support/CacheClient.java b/cache-tests/src/main/java/org/jsr107/tck/support/CacheClient.java index aee6e41..481afec 100644 --- a/cache-tests/src/main/java/org/jsr107/tck/support/CacheClient.java +++ b/cache-tests/src/main/java/org/jsr107/tck/support/CacheClient.java @@ -7,6 +7,7 @@ package org.jsr107.tck.support; import java.io.Closeable; +import java.io.IOException; import java.io.Serializable; import java.net.InetAddress; @@ -61,11 +62,13 @@ protected synchronized Client getClient() { * {@inheritDoc} */ @Override - public synchronized void close() { + public synchronized void close() throws IOException { if (client != null) { try { client.invoke(Server.CLOSE_OPERATION); client.close(); + } catch(RuntimeException e) { + throw new IOException("Error on close", e); } finally { client = null; }