HHH-11824 Remove Types.REF_CURSOR reflection
https://hibernate.atlassian.net/browse/HHH-11824
This commit is contained in:
parent
67b01b5004
commit
dda0c4c37e
|
@ -173,21 +173,8 @@ public class StandardRefCursorSupport implements RefCursorSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static Integer refCursorTypeCode;
|
|
||||||
|
|
||||||
private int refCursorTypeCode() {
|
private int refCursorTypeCode() {
|
||||||
if ( refCursorTypeCode == null ) {
|
return Types.REF_CURSOR;
|
||||||
try {
|
|
||||||
refCursorTypeCode = (Integer) Types.class.getField( "REF_CURSOR" ).get( null );
|
|
||||||
}
|
|
||||||
catch (NoSuchFieldException e) {
|
|
||||||
throw new HibernateException( "java.sql.Types class does not define REF_CURSOR field..." );
|
|
||||||
}
|
|
||||||
catch (IllegalAccessException e) {
|
|
||||||
throw new HibernateException( "Unexpected error trying to determine REF_CURSOR field value : " + e.getMessage() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return refCursorTypeCode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue