From ac51fb30e9702805e257af736e8923d1d175d2ce Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Mon, 4 Nov 2024 08:20:09 -0600 Subject: [PATCH] Issue #30050 NullPointerException in finally of testUsingUCP --- .../oracleucpfat/src/ucp/web/OracleUCPTestServlet.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dev/com.ibm.ws.jdbc_fat_oracle/test-applications/oracleucpfat/src/ucp/web/OracleUCPTestServlet.java b/dev/com.ibm.ws.jdbc_fat_oracle/test-applications/oracleucpfat/src/ucp/web/OracleUCPTestServlet.java index 38a8a142f98..cc93baee3e8 100644 --- a/dev/com.ibm.ws.jdbc_fat_oracle/test-applications/oracleucpfat/src/ucp/web/OracleUCPTestServlet.java +++ b/dev/com.ibm.ws.jdbc_fat_oracle/test-applications/oracleucpfat/src/ucp/web/OracleUCPTestServlet.java @@ -400,7 +400,8 @@ public void testOracleUCPMaxConnections() throws Exception { } finally { con1.close(); - con2.close(); + if (con2 != null) + con2.close(); } } @@ -456,7 +457,8 @@ public void testOracleUCPMaxConnectionsEmbedded() throws Exception { } finally { con1.close(); - con2.close(); + if (con2 != null) + con2.close(); } } @@ -765,7 +767,8 @@ public void testUsingUCP() throws Exception { } finally { con1.close(); - con2.close(); + if (con2 != null) + con2.close(); } }