@@ -140,7 +140,7 @@ static void prepareConnectionPoolDatasources() {
140140
141141 static DataSource createTomcatDs (String dbType , String jdbcUrl ) {
142142 org .apache .tomcat .jdbc .pool .DataSource ds = new org .apache .tomcat .jdbc .pool .DataSource ();
143- String jdbcUrlToSet = Objects .equals (dbType , "derby" ) ? jdbcUrl + ";create=true" : jdbcUrl ;
143+ String jdbcUrlToSet = dbType .equals ("derby" ) ? jdbcUrl + ";create=true" : jdbcUrl ;
144144 ds .setUrl (jdbcUrlToSet );
145145 ds .setDriverClassName (jdbcDriverClassNames .get (dbType ));
146146 String username = jdbcUserNames .get (dbType );
@@ -155,7 +155,7 @@ static DataSource createTomcatDs(String dbType, String jdbcUrl) {
155155
156156 static DataSource createHikariDs (String dbType , String jdbcUrl ) {
157157 HikariConfig config = new HikariConfig ();
158- String jdbcUrlToSet = Objects .equals (dbType , "derby" ) ? jdbcUrl + ";create=true" : jdbcUrl ;
158+ String jdbcUrlToSet = dbType .equals ("derby" ) ? jdbcUrl + ";create=true" : jdbcUrl ;
159159 config .setJdbcUrl (jdbcUrlToSet );
160160 String username = jdbcUserNames .get (dbType );
161161 if (username != null ) {
@@ -177,7 +177,7 @@ static DataSource createC3P0Ds(String dbType, String jdbcUrl) {
177177 } catch (PropertyVetoException e ) {
178178 throw new RuntimeException (e );
179179 }
180- String jdbcUrlToSet = Objects .equals (dbType , "derby" ) ? jdbcUrl + ";create=true" : jdbcUrl ;
180+ String jdbcUrlToSet = dbType .equals ("derby" ) ? jdbcUrl + ";create=true" : jdbcUrl ;
181181 ds .setJdbcUrl (jdbcUrlToSet );
182182 String username = jdbcUserNames .get (dbType );
183183 if (username != null ) {
@@ -190,13 +190,13 @@ static DataSource createC3P0Ds(String dbType, String jdbcUrl) {
190190
191191 static DataSource createDs (String connectionPoolName , String dbType , String jdbcUrl ) {
192192 DataSource ds = null ;
193- if (Objects .equals (connectionPoolName , "tomcat" )) {
193+ if (connectionPoolName .equals ("tomcat" )) {
194194 ds = createTomcatDs (dbType , jdbcUrl );
195195 }
196- if (Objects .equals (connectionPoolName , "hikari" )) {
196+ if (connectionPoolName .equals ("hikari" )) {
197197 ds = createHikariDs (dbType , jdbcUrl );
198198 }
199- if (Objects .equals (connectionPoolName , "c3p0" )) {
199+ if (connectionPoolName .equals ("c3p0" )) {
200200 ds = createC3P0Ds (dbType , jdbcUrl );
201201 }
202202 return ds ;
@@ -720,7 +720,7 @@ void testStatementUpdate(
720720 cleanup .deferCleanup (statement );
721721 cleanup .deferCleanup (connection );
722722 String sql = connection .nativeSQL (query );
723- testing .runWithSpan ("parent" , () -> statement .execute (sql ));
723+ testing .runWithSpan ("parent" , () -> assertThat ( statement .execute (sql )). isFalse ( ));
724724
725725 assertThat (statement .getUpdateCount ()).isEqualTo (0 );
726726
@@ -832,7 +832,7 @@ void testPreparedStatementUpdate(
832832 PreparedStatement statement = connection .prepareStatement (sql );
833833 cleanup .deferCleanup (statement );
834834 cleanup .deferCleanup (connection );
835- testing .runWithSpan ("parent" , () -> statement .executeUpdate () == 0 );
835+ testing .runWithSpan ("parent" , () -> assertThat ( statement .executeUpdate ()). isEqualTo ( 0 ) );
836836
837837 testing .waitAndAssertTraces (
838838 trace ->
0 commit comments