Mercurial > hg > jdk9-shenandoah > jdk
changeset 9748:eb6fe08babef
8028385: Enhance RowSet Factory
Reviewed-by: alanb, skoivu
author | lancea |
---|---|
date | Fri, 15 Nov 2013 11:07:04 -0500 |
parents | 58e58f112e8a |
children | 2240dd072881 |
files | src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java |
diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java Fri Oct 25 14:35:42 2013 -0400 +++ b/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java Fri Nov 15 11:07:04 2013 -0500 @@ -27,6 +27,7 @@ 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 @@ // 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);