This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git

commit 07069d14598e3b69d06a41dbba560eb040353877
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Nov 21 19:56:44 2025 +0000

    Merge if statements
---
 src/main/java/org/apache/commons/dbcp2/datasources/PoolKey.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/PoolKey.java 
b/src/main/java/org/apache/commons/dbcp2/datasources/PoolKey.java
index e9edfea7..492b23e6 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/PoolKey.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/PoolKey.java
@@ -40,10 +40,7 @@ final class PoolKey implements Serializable {
         if (this == obj) {
             return true;
         }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
+        if (obj == null || getClass() != obj.getClass()) {
             return false;
         }
         final PoolKey other = (PoolKey) obj;

Reply via email to