From 5616284a12fd53f06d336c2d75f851d8dcacfd8f Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 13 Jul 2021 16:36:39 +0100 Subject: [PATCH] HHH-14727 Minor code cleanup in StandardSQLExceptionConverter --- .../internal/StandardSQLExceptionConverter.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/exception/internal/StandardSQLExceptionConverter.java b/hibernate-core/src/main/java/org/hibernate/exception/internal/StandardSQLExceptionConverter.java index 855305bb9e..175835d992 100644 --- a/hibernate-core/src/main/java/org/hibernate/exception/internal/StandardSQLExceptionConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/exception/internal/StandardSQLExceptionConverter.java @@ -19,21 +19,14 @@ import org.hibernate.exception.spi.SQLExceptionConverter; * @author Steve Ebersole */ public class StandardSQLExceptionConverter implements SQLExceptionConverter { - private ArrayList delegates = new ArrayList(); + + private final ArrayList delegates = new ArrayList(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