FirebirdSQL / jaybird

JDBC driver for Firebird
https://firebirdsql.org/en/jdbc-driver/
GNU Lesser General Public License v2.1
94 stars 23 forks source link

Remove generics from SQLExceptionChainBuilder #785

Closed mrotteveel closed 9 months ago

mrotteveel commented 9 months ago

The class SQLExceptionChainBuilder (internal API) uses generics for the exception type (SQLException or a subclass). In practice, this is only used within FbExceptionBuilder when building a chain of FBSQLExceptionInfo in toFlatSQLException to preserve the individual elements. The presence of the generics just makes the definition/instantiation and use more verbose for little to no actual benefit (and in the case of FbExceptionBuilder the restriction to only add instances of FBSQLExceptionInfo is hardly relevant, and follows from the code itself, and is limited to a single method).