mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-05 04:31:36 +00:00
8028385: Enhance RowSet Factory
Reviewed-by: alanb, skoivu
This commit is contained in:
parent
8096e5327c
commit
2afce421d5
@ -27,6 +27,7 @@ package javax.sql.rowset.serial;
|
||||
import java.sql.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
|
||||
/**
|
||||
* An input stream used for custom mapping user-defined types (UDTs).
|
||||
@ -476,13 +477,9 @@ public class SQLInputImpl implements SQLInput {
|
||||
// create new instance of the class
|
||||
SQLData obj = null;
|
||||
try {
|
||||
obj = (SQLData)c.newInstance();
|
||||
} catch (java.lang.InstantiationException ex) {
|
||||
throw new SQLException("Unable to instantiate: " +
|
||||
ex.getMessage());
|
||||
} catch (java.lang.IllegalAccessException ex) {
|
||||
throw new SQLException("Unable to instantiate: " +
|
||||
ex.getMessage());
|
||||
obj = (SQLData)ReflectUtil.newInstance(c);
|
||||
} catch (Exception ex) {
|
||||
throw new SQLException("Unable to Instantiate: ", ex);
|
||||
}
|
||||
// get the attributes from the struct
|
||||
Object attribs[] = s.getAttributes(map);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user