Skip to content

Commit

Permalink
Don't assume that 'rabbitmq-http-port' is always set
Browse files Browse the repository at this point in the history
Fixes: #26873
(cherry picked from commit f6bd899)
  • Loading branch information
geoand authored and gsmet committed Jul 26, 2022
1 parent c5dca42 commit f03595d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{#if info:rabbitHttpPort.httpPort != null}
<a target="_blank" href="http://localhost:{info:rabbitHttpPort.httpPort}" class="badge badge-light">
<i class="fa fa-external-link-alt fa-fw"></i>
RabbitMQ management UI <span class="badge badge-light">{info:rabbitHttpPort.httpPort}</span></a>
<br>
{/if}

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public class RabbitHttpPortFinder {
String httpPort;

void collect(@Observes StartupEvent event, Config config) {
httpPort = config.getValue("rabbitmq-http-port", String.class);
httpPort = config.getOptionalValue("rabbitmq-http-port", String.class).orElse(null);
}
}

0 comments on commit f03595d

Please sign in to comment.