HHH-14727 Minor code cleanup in StandardSQLExceptionConverter
This commit is contained in:
parent
e4199decb5
commit
5616284a12
|
@ -19,21 +19,14 @@ import org.hibernate.exception.spi.SQLExceptionConverter;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public class StandardSQLExceptionConverter implements SQLExceptionConverter {
|
||||
private ArrayList<SQLExceptionConversionDelegate> delegates = new ArrayList<SQLExceptionConversionDelegate>();
|
||||
|
||||
private final ArrayList<SQLExceptionConversionDelegate> delegates = new ArrayList<SQLExceptionConversionDelegate>(4);
|
||||
|
||||
public StandardSQLExceptionConverter() {
|
||||
}
|
||||
|
||||
public StandardSQLExceptionConverter(SQLExceptionConversionDelegate... delegates) {
|
||||
if ( delegates != null ) {
|
||||
this.delegates.addAll( Arrays.asList( delegates ) );
|
||||
}
|
||||
}
|
||||
|
||||
public void addDelegate(SQLExceptionConversionDelegate delegate) {
|
||||
if ( delegate != null ) {
|
||||
this.delegates.add( delegate );
|
||||
}
|
||||
this.delegates.add( delegate );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue