Skip to content

Commit 5616284

Browse files
committed
HHH-14727 Minor code cleanup in StandardSQLExceptionConverter
1 parent e4199de commit 5616284

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

hibernate-core/src/main/java/org/hibernate/exception/internal/StandardSQLExceptionConverter.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,14 @@
1919
* @author Steve Ebersole
2020
*/
2121
public class StandardSQLExceptionConverter implements SQLExceptionConverter {
22-
private ArrayList<SQLExceptionConversionDelegate> delegates = new ArrayList<SQLExceptionConversionDelegate>();
2322

24-
public StandardSQLExceptionConverter() {
25-
}
23+
private final ArrayList<SQLExceptionConversionDelegate> delegates = new ArrayList<SQLExceptionConversionDelegate>(4);
2624

27-
public StandardSQLExceptionConverter(SQLExceptionConversionDelegate... delegates) {
28-
if ( delegates != null ) {
29-
this.delegates.addAll( Arrays.asList( delegates ) );
30-
}
25+
public StandardSQLExceptionConverter() {
3126
}
3227

3328
public void addDelegate(SQLExceptionConversionDelegate delegate) {
34-
if ( delegate != null ) {
35-
this.delegates.add( delegate );
36-
}
29+
this.delegates.add( delegate );
3730
}
3831

3932
@Override

0 commit comments

Comments
 (0)