Skip to content

Commit

Permalink
Merge pull request apache#4833 from hansva/main
Browse files Browse the repository at this point in the history
fix connection fetch, apache#4369
  • Loading branch information
hansva authored Jan 27, 2025
2 parents 1ecf04b + 6fab841 commit 9f8d6fd
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 9f8d6fd

Please sign in to comment.