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

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git

commit c063ee175f9034feb3bd0ff3f6ae28dfd1d4f631
Author: Andrus Adamchik <[email protected]>
AuthorDate: Thu Jun 25 18:04:32 2026 -0400

     Rethinking QuotingStrategy to remove dependency on the ORM model...
    
    fixing handling of empty schemas, catalogs
---
 .../src/main/java/org/apache/cayenne/dba/QuotingStrategy.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/cayenne/src/main/java/org/apache/cayenne/dba/QuotingStrategy.java 
b/cayenne/src/main/java/org/apache/cayenne/dba/QuotingStrategy.java
index a4120c943..079ae3480 100644
--- a/cayenne/src/main/java/org/apache/cayenne/dba/QuotingStrategy.java
+++ b/cayenne/src/main/java/org/apache/cayenne/dba/QuotingStrategy.java
@@ -50,8 +50,9 @@ public interface QuotingStrategy {
     void appendEnd(Appendable out);
 
     /**
-     * Appends a fully-qualified name, joining non-null parts with {@code '.'} 
and wrapping each part
-     * in start/end quotes. {@code null} parts are skipped.
+     * Appends a fully-qualified name, joining non-empty parts with {@code 
'.'} and wrapping each part
+     * in start/end quotes. {@code null} and empty parts are skipped (e.g. an 
absent catalog reported
+     * as an empty string by JDBC metadata).
      *
      * @since 5.0
      */
@@ -59,7 +60,7 @@ public interface QuotingStrategy {
         try {
             boolean first = true;
             for (String part : parts) {
-                if (part == null) {
+                if (part == null || part.isEmpty()) {
                     continue;
                 }
                 if (!first) {
@@ -89,8 +90,8 @@ public interface QuotingStrategy {
     }
 
     /**
-     * Returns a quoted fully-qualified name, joining non-null parts with 
{@code '.'} and wrapping
-     * each part in start/end quotes. {@code null} parts are skipped.
+     * Returns a quoted fully-qualified name, joining non-empty parts with 
{@code '.'} and wrapping
+     * each part in start/end quotes. {@code null} and empty parts are skipped.
      *
      * @since 5.0
      */

Reply via email to