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

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


The following commit(s) were added to refs/heads/main by this push:
     new 58cc901bae add variable resolvers to getUsedVariables. fixes #7293 
(#7306)
58cc901bae is described below

commit 58cc901baec09b38a71c06a06962346b8b233c1b
Author: Bart Maertens <[email protected]>
AuthorDate: Thu Jun 18 09:31:17 2026 +0200

    add variable resolvers to getUsedVariables. fixes #7293 (#7306)
---
 core/src/main/java/org/apache/hop/core/util/StringUtil.java     | 1 +
 core/src/test/java/org/apache/hop/core/encryption/EncrTest.java | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/core/src/main/java/org/apache/hop/core/util/StringUtil.java 
b/core/src/main/java/org/apache/hop/core/util/StringUtil.java
index 8219bf5b83..3688528bc4 100644
--- a/core/src/main/java/org/apache/hop/core/util/StringUtil.java
+++ b/core/src/main/java/org/apache/hop/core/util/StringUtil.java
@@ -371,6 +371,7 @@ public class StringUtil {
       String aString, List<String> list, boolean includeSystemVariables) {
     getUsedVariables(aString, UNIX_OPEN, UNIX_CLOSE, list, 
includeSystemVariables);
     getUsedVariables(aString, WINDOWS_OPEN, WINDOWS_CLOSE, list, 
includeSystemVariables);
+    getUsedVariables(aString, RESOLVER_OPEN, RESOLVER_CLOSE, list, 
includeSystemVariables);
   }
 
   public static String generateRandomString(
diff --git a/core/src/test/java/org/apache/hop/core/encryption/EncrTest.java 
b/core/src/test/java/org/apache/hop/core/encryption/EncrTest.java
index a166f0f1a5..a3faf7eef2 100644
--- a/core/src/test/java/org/apache/hop/core/encryption/EncrTest.java
+++ b/core/src/test/java/org/apache/hop/core/encryption/EncrTest.java
@@ -126,6 +126,9 @@ class EncrTest {
     encryption = Encr.encryptPasswordIfNotUsingVariables(" %%VAR%% String");
     assertEquals(" %%VAR%% String", encryption);
 
+    encryption = 
Encr.encryptPasswordIfNotUsingVariables("#{vault:hop/data/some-db:password}");
+    assertEquals("#{vault:hop/data/some-db:password}", encryption);
+
     encryption = Encr.encryptPasswordIfNotUsingVariables(" %% VAR String");
     assertEquals("Encrypted 2be988fed4f87a4a599599d64cc9ba1dd", encryption);
 
@@ -159,6 +162,10 @@ class EncrTest {
     decryption = Encr.decryptPasswordOptionallyEncrypted(encryption);
     assertEquals(" %%VAR%% String", decryption);
 
+    encryption = 
Encr.encryptPasswordIfNotUsingVariables("#{vault:hop/data/some-db:password}");
+    decryption = Encr.decryptPasswordOptionallyEncrypted(encryption);
+    assertEquals("#{vault:hop/data/some-db:password}", decryption);
+
     encryption = Encr.encryptPasswordIfNotUsingVariables(" %% VAR String");
     decryption = Encr.decryptPasswordOptionallyEncrypted(encryption);
     assertEquals(" %% VAR String", decryption);

Reply via email to