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
The following commit(s) were added to refs/heads/master by this push:
new a86d227 Use isEmpty().
a86d227 is described below
commit a86d2278053157ab1564044cceb34af45d682522
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jan 17 09:09:15 2021 -0500
Use isEmpty().
---
src/main/java/org/apache/commons/dbcp2/PoolableConnection.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
index db7afa5..a8f9178 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
@@ -278,7 +278,7 @@ public class PoolableConnection extends
DelegatingConnection<Connection> impleme
throw new
SQLException(Utils.getMessage("poolableConnection.validate.fastFail"));
}
- if (sql == null || sql.length() == 0) {
+ if (sql == null || sql.isEmpty()) {
if (timeoutSeconds < 0) {
timeoutSeconds = 0;
}