You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/11/23 13:27:16 UTC

(commons-dbutils) 02/03: Fix StatementConfiguration SpotBugs CT: Be wary of letting constructors throw exceptions. (CT_CONSTRUCTOR_THROW).

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-dbutils.git

commit 1a31f8b70c1453e72b3d25051ddb3d2109e649fb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Nov 23 08:25:55 2023 -0500

    Fix StatementConfiguration SpotBugs CT: Be wary of letting constructors
    throw exceptions. (CT_CONSTRUCTOR_THROW).
---
 src/changes/changes.xml                                             | 2 ++
 .../java/org/apache/commons/dbutils/StatementConfiguration.java     | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 44d520b..f17fb7d 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -47,6 +47,8 @@ The <action> type attribute can be add,update,fix,remove.
       <!-- FIX -->
       <action dev="ggregory" type="update" due-to="sanjanarampurkottur01, Gary Gregory">Switch on String instead of cascading if-else in MockResultSet #220.</action>
       <action dev="ggregory" type="update" due-to="sanjanarampurkottur01, Gary Gregory">Encapsulate test fields #222.</action>
+      <action dev="ggregory" type="update" due-to="Gary Gregory">Fix BeanProcessor SpotBugs CT: Be wary of letting constructors throw exceptions. (CT_CONSTRUCTOR_THROW).</action>
+      <action dev="ggregory" type="update" due-to="Gary Gregory">Fix StatementConfiguration SpotBugs CT: Be wary of letting constructors throw exceptions. (CT_CONSTRUCTOR_THROW).</action>
       <!-- ADD -->
       <!-- UPDATE -->
       <action dev="ggregory" type="update" due-to="Gary Gregory">Bump Java from 8 to 11.</action>
diff --git a/src/main/java/org/apache/commons/dbutils/StatementConfiguration.java b/src/main/java/org/apache/commons/dbutils/StatementConfiguration.java
index da10a3d..6793b86 100644
--- a/src/main/java/org/apache/commons/dbutils/StatementConfiguration.java
+++ b/src/main/java/org/apache/commons/dbutils/StatementConfiguration.java
@@ -149,6 +149,12 @@ public class StatementConfiguration {
         this(fetchDirection, fetchSize, maxFieldSize, maxRows, Duration.ofSeconds(queryTimeout));
     }
 
+    /** Does nothing. */
+    @Override
+    protected final void finalize() {
+        // SpotBugs CT_CONSTRUCTOR_THROW
+    }
+
     /**
      * Gets the fetch direction.
      *