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

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/master by this push:
     new d95df12498 In "Database Explorer", sort Schemas alphabetically #3112
     new 85b27c89a3 Merge pull request #3115 from nadment/3112
d95df12498 is described below

commit d95df124981c463285cb7e1f07df38f5780481bb
Author: Nicolas Adment <[email protected]>
AuthorDate: Thu Jul 27 19:22:57 2023 +0200

    In "Database Explorer", sort Schemas alphabetically #3112
---
 .../java/org/apache/hop/core/database/DatabaseMetaInformation.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/core/src/main/java/org/apache/hop/core/database/DatabaseMetaInformation.java 
b/core/src/main/java/org/apache/hop/core/database/DatabaseMetaInformation.java
index c051b136d3..a8ee151b11 100644
--- 
a/core/src/main/java/org/apache/hop/core/database/DatabaseMetaInformation.java
+++ 
b/core/src/main/java/org/apache/hop/core/database/DatabaseMetaInformation.java
@@ -235,6 +235,10 @@ public class DatabaseMetaInformation {
           // Ignore it to avoid excessive spamming
         }
 
+        
+        // Sort the schemas by names
+        Collections.sort(schemaList, (s1, s2) -> {return 
s1.getSchemaName()==null ? 
-1:s1.getSchemaName().compareToIgnoreCase(s2.getSchemaName());});
+        
         // Save for later...
         setSchemas(schemaList.toArray(new Schema[schemaList.size()]));
       }

Reply via email to