Skip to content

Commit 6a6c5be

Browse files
authored
Merge pull request #3072 from KIT-IBPT/issue-3071
Fix handling of multiple Kafka hosts when creating alarm tree
2 parents 6f569fe + 2d55d0d commit 6a6c5be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/alarm/ui/src/main/java/org/phoebus/applications/alarm/ui/tree/AlarmTreeInstance.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public AlarmTreeInstance(final AlarmTreeApplication app, final URI input) throws
4949
this.app = app;
5050

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

0 commit comments

Comments
 (0)