提交 88c53b88 编写于 作者: L lancea

8028385: Enhance RowSet Factory

Reviewed-by: alanb, skoivu
上级 52f9c749
...@@ -27,6 +27,7 @@ package javax.sql.rowset.serial; ...@@ -27,6 +27,7 @@ package javax.sql.rowset.serial;
import java.sql.*; import java.sql.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.Map; import java.util.Map;
import sun.reflect.misc.ReflectUtil;
/** /**
* An input stream used for custom mapping user-defined types (UDTs). * An input stream used for custom mapping user-defined types (UDTs).
...@@ -476,13 +477,9 @@ public class SQLInputImpl implements SQLInput { ...@@ -476,13 +477,9 @@ public class SQLInputImpl implements SQLInput {
// create new instance of the class // create new instance of the class
SQLData obj = null; SQLData obj = null;
try { try {
obj = (SQLData)c.newInstance(); obj = (SQLData)ReflectUtil.newInstance(c);
} catch (java.lang.InstantiationException ex) { } catch (Exception ex) {
throw new SQLException("Unable to instantiate: " + throw new SQLException("Unable to Instantiate: ", ex);
ex.getMessage());
} catch (java.lang.IllegalAccessException ex) {
throw new SQLException("Unable to instantiate: " +
ex.getMessage());
} }
// get the attributes from the struct // get the attributes from the struct
Object attribs[] = s.getAttributes(map); Object attribs[] = s.getAttributes(map);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册