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 19c2f77bef Rest connection should use Base URL when Test URL is empty,
fixes #5681 (#5682)
19c2f77bef is described below
commit 19c2f77bef0b165cad3c12977c2b37eea2068e7e
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Fri Sep 5 09:53:49 2025 +0200
Rest connection should use Base URL when Test URL is empty, fixes #5681
(#5682)
---
.../main/java/org/apache/hop/metadata/rest/RestConnectionEditor.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/plugins/misc/rest/src/main/java/org/apache/hop/metadata/rest/RestConnectionEditor.java
b/plugins/misc/rest/src/main/java/org/apache/hop/metadata/rest/RestConnectionEditor.java
index 096ea0594a..f71acd0eba 100644
---
a/plugins/misc/rest/src/main/java/org/apache/hop/metadata/rest/RestConnectionEditor.java
+++
b/plugins/misc/rest/src/main/java/org/apache/hop/metadata/rest/RestConnectionEditor.java
@@ -195,9 +195,10 @@ public class RestConnectionEditor extends
MetadataEditor<RestConnection> {
restConnection.setName(wName.getText());
if (StringUtils.isEmpty(wTestUrl.getText())) {
restConnection.setTestUrl(wBaseUrl.getText());
+ } else {
+ restConnection.setTestUrl(wTestUrl.getText());
}
restConnection.setBaseUrl(wBaseUrl.getText());
- restConnection.setTestUrl(wTestUrl.getText());
restConnection.setAuthorizationHeaderName(wAuthorizationName.getText());
restConnection.setAuthorizationPrefix(wAuthorizationPrefix.getText());
restConnection.setAuthorizationHeaderValue(wAuthorizationValue.getText());
@@ -208,7 +209,7 @@ public class RestConnectionEditor extends
MetadataEditor<RestConnection> {
String message =
BaseMessages.getString(PKG,
"RestConnectionEditor.ConnectionTestSuccess") + Const.CR;
message += Const.CR;
- message += "URL : " + wTestUrl.getText();
+ message += "URL : " + restConnection.getTestUrl();
box.setMessage(message);
box.open();
} catch (Exception e) {