Skip to content

Commit

Permalink
Merge pull request #3072 from KIT-IBPT/issue-3071
Browse files Browse the repository at this point in the history
Fix handling of multiple Kafka hosts when creating alarm tree
  • Loading branch information
shroffk authored Jul 15, 2024
2 parents 6f569fe + 2d55d0d commit 6a6c5be
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public AlarmTreeInstance(final AlarmTreeApplication app, final URI input) throws
this.app = app;

// split input with/without (raw) query
final URI resource = new URI(input.getScheme(), input.getUserInfo(), input.getHost(), input.getPort(), input.getPath(), null, null);
// When the URI specifies multiple host / port pairs getHost() will not
// work, so we use getAuthority() instead.
final URI resource = new URI(input.getScheme(), input.getAuthority(), input.getPath(), null, null);
String itemName = AlarmURI.getRawQueryParametersValues(input).get(AlarmURI.QUERY_PARAMETER_ITEM_NAME);
itemName = itemName != null ? URLDecoder.decode(itemName, StandardCharsets.UTF_8) : null;

Expand Down

0 comments on commit 6a6c5be

Please sign in to comment.