You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by th...@apache.org on 2019/12/30 01:33:12 UTC

[commons-dbutils] branch master updated (568c83c -> 8cfb0d4)

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

thecarlhall pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbutils.git.


    from 568c83c  Remove removed property for japicmp as of commons-parent:50. Will re-enable by file later when I figure out how to ignore a known breakage between major revisions.
     new 6ae6070  Add javadoc to new annotation
     new f7deda4  Correct deprecated methods to use advised call per javadoc. Suppress unchecked warning when creating an enum from String.
     new 6f47d76  Activate profiles for clirr and japicmp
     new 8e57ef3  Add config for japicmp to not break the build; update version. Add minSeverity to clirr configuration.
     new 23812de  Remove ignored clirr differences. It's valuable at build time to point out at build time and is included in reports for publishing. Ignoring anything here may create dischord with what is reported by japicmp.
     new 8cfb0d4  Update travis post command to use jacoco, its profile, and run in batch mode

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml                                        |  2 +-
 clirr-ignored.xml                                  | 23 ----------------------
 pom.xml                                            | 16 ++++-----------
 .../org/apache/commons/dbutils/BeanProcessor.java  |  8 ++------
 .../java/org/apache/commons/dbutils/DbUtils.java   |  3 +++
 .../apache/commons/dbutils/annotations/Column.java |  5 +++++
 .../properties/StringEnumPropertyHandler.java      |  1 +
 .../resources/{profile.jacoco => profile.clirr}    |  0
 .../resources/{profile.jacoco => profile.japicmp}  |  0
 9 files changed, 16 insertions(+), 42 deletions(-)
 delete mode 100644 clirr-ignored.xml
 copy src/site/resources/{profile.jacoco => profile.clirr} (100%)
 copy src/site/resources/{profile.jacoco => profile.japicmp} (100%)


[commons-dbutils] 01/06: Add javadoc to new annotation

Posted by th...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6ae607096aff1a2910c16b872fce5b6a041c4443
Author: Carl Hall <th...@apache.org>
AuthorDate: Sun Dec 29 17:05:23 2019 -0800

    Add javadoc to new annotation
---
 src/main/java/org/apache/commons/dbutils/annotations/Column.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main/java/org/apache/commons/dbutils/annotations/Column.java b/src/main/java/org/apache/commons/dbutils/annotations/Column.java
index 231c4c1..4835d24 100644
--- a/src/main/java/org/apache/commons/dbutils/annotations/Column.java
+++ b/src/main/java/org/apache/commons/dbutils/annotations/Column.java
@@ -21,6 +21,11 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+/**
+ * Annotation for BeanProcessor to receive hints of the field name rather than dissecting the method name.
+ *
+ * @since 2.0
+ */
 @Target({ ElementType.METHOD})
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Column {


[commons-dbutils] 06/06: Update travis post command to use jacoco, its profile, and run in batch mode

Posted by th...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8cfb0d4be23034da5b591165705feaa6920e4a72
Author: Carl Hall <th...@apache.org>
AuthorDate: Sun Dec 29 17:33:06 2019 -0800

    Update travis post command to use jacoco, its profile, and run in batch mode
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index f3631a1..307bbe8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,4 +26,4 @@ jdk:
   - openjdk-ea
 
 after_success:
-  - mvn clean cobertura:cobertura coveralls:report
+  - mvn -B clean test jacoco:report coveralls:report -Ptravis-jacoco


[commons-dbutils] 04/06: Add config for japicmp to not break the build; update version. Add minSeverity to clirr configuration.

Posted by th...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8e57ef36611f8aa6afb37736fd0ee7ca88d28f3b
Author: Carl Hall <th...@apache.org>
AuthorDate: Sun Dec 29 17:03:14 2019 -0800

    Add config for japicmp to not break the build; update version.
    Add minSeverity to clirr configuration.
---
 pom.xml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5cd1296..d3eaf73 100644
--- a/pom.xml
+++ b/pom.xml
@@ -241,6 +241,10 @@
     <dbutils.spotbugs.version>3.1.12</dbutils.spotbugs.version>
     <dbutils.checkstyle.version>8.27</dbutils.checkstyle.version>
 
+    <!-- generate report even if there are binary incompatible changes -->
+    <commons.japicmp.breakBuildOnBinaryIncompatibleModifications>false</commons.japicmp.breakBuildOnBinaryIncompatibleModifications>
+    <commons.japicmp.version>0.14.3</commons.japicmp.version>
+
     <commons.componentid>dbutils</commons.componentid>
     <commons.module.name>org.apache.commons.dbutils</commons.module.name>
     <commons.release.version>2.0</commons.release.version>
@@ -289,6 +293,7 @@
           <artifactId>clirr-maven-plugin</artifactId>
           <version>${commons.clirr.version}</version>
           <configuration>
+            <minSeverity>${minSeverity}</minSeverity>
             <ignoredDifferencesFile>${basedir}/clirr-ignored.xml</ignoredDifferencesFile>
           </configuration>
         </plugin>
@@ -378,10 +383,6 @@
           </rulesets>
         </configuration>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>clirr-maven-plugin</artifactId>
-      </plugin>
     </plugins>
   </reporting>
   <profiles>


[commons-dbutils] 03/06: Activate profiles for clirr and japicmp

Posted by th...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6f47d76063a0a273948f864fc9a40c34ef7ae34b
Author: Carl Hall <th...@apache.org>
AuthorDate: Sun Dec 29 17:06:51 2019 -0800

    Activate profiles for clirr and japicmp
---
 src/site/resources/profile.clirr   | 0
 src/site/resources/profile.japicmp | 0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/src/site/resources/profile.clirr b/src/site/resources/profile.clirr
new file mode 100644
index 0000000..e69de29
diff --git a/src/site/resources/profile.japicmp b/src/site/resources/profile.japicmp
new file mode 100644
index 0000000..e69de29


[commons-dbutils] 05/06: Remove ignored clirr differences. It's valuable at build time to point out at build time and is included in reports for publishing. Ignoring anything here may create dischord with what is reported by japicmp.

Posted by th...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 23812de4a82187f7fb79110bf9ecc3e6ff26023c
Author: Carl Hall <th...@apache.org>
AuthorDate: Sun Dec 29 17:13:06 2019 -0800

    Remove ignored clirr differences.
    It's valuable at build time to point out at build time and is included
    in reports for publishing. Ignoring anything here may create dischord
    with what is reported by japicmp.
---
 clirr-ignored.xml | 23 -----------------------
 pom.xml           |  9 ---------
 2 files changed, 32 deletions(-)

diff --git a/clirr-ignored.xml b/clirr-ignored.xml
deleted file mode 100644
index d57e5cb..0000000
--- a/clirr-ignored.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-       http://www.apache.org/licenses/LICENSE-2.0
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-
-<differences>
-    <difference>
-        <className>**/org/apache/commons/dbutils/AbstractQueryRunner</className>
-        <differenceType>6010</differenceType>
-        <field>ds</field>
-    </difference>
-</differences>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index d3eaf73..490d0a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -288,15 +288,6 @@
             <excludeFilterFile>sb-excludes.xml</excludeFilterFile>
           </configuration>
         </plugin>
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>clirr-maven-plugin</artifactId>
-          <version>${commons.clirr.version}</version>
-          <configuration>
-            <minSeverity>${minSeverity}</minSeverity>
-            <ignoredDifferencesFile>${basedir}/clirr-ignored.xml</ignoredDifferencesFile>
-          </configuration>
-        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>


[commons-dbutils] 02/06: Correct deprecated methods to use advised call per javadoc. Suppress unchecked warning when creating an enum from String.

Posted by th...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f7deda4bff0015aac23d43c6a9fe7c76291b72be
Author: Carl Hall <th...@apache.org>
AuthorDate: Sun Dec 29 17:05:34 2019 -0800

    Correct deprecated methods to use advised call per javadoc.
    Suppress unchecked warning when creating an enum from String.
---
 src/main/java/org/apache/commons/dbutils/BeanProcessor.java       | 8 ++------
 src/main/java/org/apache/commons/dbutils/DbUtils.java             | 3 +++
 .../dbutils/handlers/properties/StringEnumPropertyHandler.java    | 1 +
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/commons/dbutils/BeanProcessor.java b/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
index 9ccc241..1301fec 100644
--- a/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
+++ b/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
@@ -407,13 +407,9 @@ public class BeanProcessor {
      */
     protected <T> T newInstance(final Class<T> c) throws SQLException {
         try {
-            return c.newInstance();
+            return c.getDeclaredConstructor().newInstance();
 
-        } catch (final InstantiationException e) {
-            throw new SQLException(
-                "Cannot create " + c.getName() + ": " + e.getMessage());
-
-        } catch (final IllegalAccessException e) {
+        } catch (final IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException e) {
             throw new SQLException(
                 "Cannot create " + c.getName() + ": " + e.getMessage());
         }
diff --git a/src/main/java/org/apache/commons/dbutils/DbUtils.java b/src/main/java/org/apache/commons/dbutils/DbUtils.java
index 7ad90c6..8d716f9 100644
--- a/src/main/java/org/apache/commons/dbutils/DbUtils.java
+++ b/src/main/java/org/apache/commons/dbutils/DbUtils.java
@@ -215,6 +215,9 @@ public final class DbUtils {
             final Constructor<Driver> driverConstructor = driverClass.getConstructor();
 
             // make Constructor accessible if it is private
+            @SuppressWarnings("deprecation")
+            // TODO This is deprecated in Java9 and canAccess() should be used. Adding suppression for building on
+            //      later JDKs without a warning.
             final boolean isConstructorAccessible = driverConstructor.isAccessible();
             if (!isConstructorAccessible) {
                 driverConstructor.setAccessible(true);
diff --git a/src/main/java/org/apache/commons/dbutils/handlers/properties/StringEnumPropertyHandler.java b/src/main/java/org/apache/commons/dbutils/handlers/properties/StringEnumPropertyHandler.java
index 8af56ea..bd0eae9 100644
--- a/src/main/java/org/apache/commons/dbutils/handlers/properties/StringEnumPropertyHandler.java
+++ b/src/main/java/org/apache/commons/dbutils/handlers/properties/StringEnumPropertyHandler.java
@@ -28,6 +28,7 @@ public class StringEnumPropertyHandler implements PropertyHandler {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public Object apply(final Class<?> parameter, final Object value) {
         return Enum.valueOf(parameter.asSubclass(Enum.class), (String) value);
     }