Skip to content

Commit 0325cd6

Browse files
committed
HHH-14740 Still need the nullcheck removed in HHH-14727
1 parent 4454f17 commit 0325cd6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020
*/
2121
public class StandardSQLExceptionConverter implements SQLExceptionConverter {
2222

23-
private final ArrayList<SQLExceptionConversionDelegate> delegates = new ArrayList<SQLExceptionConversionDelegate>(4);
23+
private final ArrayList<SQLExceptionConversionDelegate> delegates = new ArrayList<>();
2424

2525
public StandardSQLExceptionConverter() {
2626
}
2727

2828
public void addDelegate(SQLExceptionConversionDelegate delegate) {
29-
this.delegates.add( delegate );
29+
if ( delegate != null ) {
30+
this.delegates.add( delegate );
31+
}
3032
}
3133

3234
@Override

0 commit comments

Comments
 (0)