From 6fab84110f69d57b2aa288c858b0649b164ac141 Mon Sep 17 00:00:00 2001 From: Hans Van Akelyen Date: Mon, 27 Jan 2025 10:20:12 +0100 Subject: [PATCH] fix connection fetch, #4369 --- .../apache/hop/pipeline/transforms/rest/Rest.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java b/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java index dd5d1f0ef7..06085d6965 100644 --- a/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java +++ b/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java @@ -570,14 +570,11 @@ public boolean init() { // use the information from the selection line if we have one. if (!Utils.isEmpty(meta.getConnectionName())) { try { - for (RestConnection connection : - metadataProvider.getSerializer(RestConnection.class).loadAll()) { - if (connection.getName().equals(meta.getConnectionName())) { - this.connection = connection; - baseUrl = resolve(connection.getBaseUrl()); - } - } - } catch (HopException e) { + this.connection = + metadataProvider.getSerializer(RestConnection.class).load(meta.getConnectionName()); + baseUrl = resolve(connection.getBaseUrl()); + + } catch (Exception e) { throw new RuntimeException( "REST connection " + meta.getConnectionName() + " could not be found"); }