HHH-11824 Remove Types.REF_CURSOR reflection

https://hibernate.atlassian.net/browse/HHH-11824
This commit is contained in:
Philippe Marschall 2017-06-19 15:50:03 +02:00 committed by Sanne Grinovero
parent 67b01b5004
commit dda0c4c37e
1 changed files with 1 additions and 14 deletions

View File

@ -173,21 +173,8 @@ public class StandardRefCursorSupport implements RefCursorSupport {
}
private static Integer refCursorTypeCode;
private int refCursorTypeCode() {
if ( refCursorTypeCode == null ) {
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;
return Types.REF_CURSOR;
}