From 9bc49cc43929e7654ac7ced6122582fcf37ad54d Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Sat, 19 Sep 2020 13:06:32 +0200 Subject: [PATCH] Fixed 'JdbcRowSetImpl is internal proprietary API and may be removed in a future release' warning --- .../http/impl/cache/TestByteArrayCacheEntrySerializer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestByteArrayCacheEntrySerializer.java b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestByteArrayCacheEntrySerializer.java index 17cf8d9f7..ccdedf9bd 100644 --- a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestByteArrayCacheEntrySerializer.java +++ b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestByteArrayCacheEntrySerializer.java @@ -34,6 +34,7 @@ import static org.junit.Assert.assertTrue; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; +import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.util.Date; import java.util.HashMap; @@ -49,8 +50,6 @@ import org.apache.hc.core5.http.message.StatusLine; import org.junit.Before; import org.junit.Test; -import com.sun.rowset.JdbcRowSetImpl; - public class TestByteArrayCacheEntrySerializer { private ByteArrayCacheEntrySerializer impl; @@ -239,11 +238,11 @@ public class TestByteArrayCacheEntrySerializer { } private byte[] serializeProhibitedObject() throws IOException { - final JdbcRowSetImpl jdbcRowSet = new JdbcRowSetImpl(); + final BigDecimal bigDecimal = new BigDecimal("1000.00"); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ObjectOutputStream oos = new ObjectOutputStream(baos); try { - oos.writeObject(jdbcRowSet); + oos.writeObject(bigDecimal); } finally { oos.close(); }