[ofbiz-framework] branch release18.12 updated: Fixed: Possible NPE in DatabaseUtil.getColumnInfo(...) (OFBIZ-11385)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release18.12 updated: Fixed: Possible NPE in DatabaseUtil.getColumnInfo(...) (OFBIZ-11385)

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

mbrohl pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new c7f4a27  Fixed: Possible NPE in DatabaseUtil.getColumnInfo(...) (OFBIZ-11385)
c7f4a27 is described below

commit c7f4a27f662015e2e96b68ef0697196c0565f4e0
Author: Michael Brohl <[hidden email]>
AuthorDate: Mon Feb 1 17:43:19 2021 +0100

    Fixed: Possible NPE in DatabaseUtil.getColumnInfo(...) (OFBIZ-11385)
   
    Manually backported to 18.12 because of code differences.
---
 .../entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
index 0edd110..f20dad1 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
@@ -1032,7 +1032,7 @@ public class DatabaseUtil {
 
     private Map<String, Map<String, ColumnCheckInfo>> getColumnInfo(Set<String> tableNames, boolean getPks, Collection<String> messages, ExecutorService executor) {
         // if there are no tableNames, don't even try to get the columns
-        if (tableNames.size() == 0) {
+        if (UtilValidate.isEmpty(tableNames)) {
             return new HashMap<String, Map<String, ColumnCheckInfo>>();
         }