protected void checkIndex ( int parameterIndex , int type1 , int type2 , String getName ) throws SQLException { checkIndex ( parameterIndex ) ; if ( type1 != this . testReturn [ parameterIndex - 1 ] && type2 != this . testReturn [ parameterIndex - 1 ] ) { throw new PSQLException ( GT . tr ( "Parameter of type {0} was registered, but call to get{1} (sqltype={2}) was made." , "java.sql.Types=" + testReturn [ parameterIndex - 1 ] , getName , "java.sql.Types=" + type1 ) , PSQLState . MOST_SPECIFIC_TYPE_DOES_NOT_MATCH ) ; } }
helperfunction for the getXXX calls to check isFunction and index == 1 Compare BOTH type fields against the return type .