Fixed 'JdbcRowSetImpl is internal proprietary API and may be removed in a future release' warning

This commit is contained in:
Oleg Kalnichevski 2020-09-19 13:06:32 +02:00
parent 594e5fcefb
commit 9bc49cc439
1 changed files with 3 additions and 4 deletions

View File

@ -34,6 +34,7 @@ import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.ObjectOutputStream; import java.io.ObjectOutputStream;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
@ -49,8 +50,6 @@ import org.apache.hc.core5.http.message.StatusLine;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import com.sun.rowset.JdbcRowSetImpl;
public class TestByteArrayCacheEntrySerializer { public class TestByteArrayCacheEntrySerializer {
private ByteArrayCacheEntrySerializer impl; private ByteArrayCacheEntrySerializer impl;
@ -239,11 +238,11 @@ public class TestByteArrayCacheEntrySerializer {
} }
private byte[] serializeProhibitedObject() throws IOException { private byte[] serializeProhibitedObject() throws IOException {
final JdbcRowSetImpl jdbcRowSet = new JdbcRowSetImpl(); final BigDecimal bigDecimal = new BigDecimal("1000.00");
final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final ObjectOutputStream oos = new ObjectOutputStream(baos); final ObjectOutputStream oos = new ObjectOutputStream(baos);
try { try {
oos.writeObject(jdbcRowSet); oos.writeObject(bigDecimal);
} finally { } finally {
oos.close(); oos.close();
} }