Skip to content

Commit

Permalink
Inline single use variable
Browse files Browse the repository at this point in the history
Better local var name
  • Loading branch information
garydgregory committed Feb 29, 2024
1 parent e42fd45 commit 8b2d1b2
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,14 @@ protected ConnectionFactory createConnectionFactory() throws SQLException {
Class<?> xaDataSourceClass = null;
try {
xaDataSourceClass = Class.forName(xaDataSource);
} catch (final Exception t) {
final String message = "Cannot load XA data source class '" + xaDataSource + "'";
throw new SQLException(message, t);
} catch (final Exception e) {
throw new SQLException("Cannot load XA data source class '" + xaDataSource + "'", e);
}

try {
xaDataSourceInstance = (XADataSource) xaDataSourceClass.getConstructor().newInstance();
} catch (final Exception t) {
final String message = "Cannot create XA data source of class '" + xaDataSource + "'";
throw new SQLException(message, t);
} catch (final Exception e) {
throw new SQLException("Cannot create XA data source of class '" + xaDataSource + "'", e);
}
}

Expand Down

0 comments on commit 8b2d1b2

Please sign in to comment.