From d9f15636d0e689acead976d52f127bd445d4cda0 Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Sun, 15 Nov 2015 22:11:58 +0100 Subject: [PATCH] Fix use of == in EndpointWebMvcHypermediaManagementContextConfiguration Closes gh-4502 Closes gh-4536 --- ...EndpointWebMvcHypermediaManagementContextConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.java index 3858c6e968..f61fcbc490 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.java @@ -128,8 +128,7 @@ public class EndpointWebMvcHypermediaManagementContextConfiguration { ManagementServerProperties management, DocsMvcEndpoint endpoint) { String path = management.getContextPath() + endpoint.getPath() + "/#spring_boot_actuator__{rel}"; - if (server.getPort() == management.getPort() && management.getPort() != null - && management.getPort() != 0) { + if (server.getPort().equals(management.getPort()) && management.getPort() != 0) { path = server.getPath(path); } return new DefaultCurieProvider("boot", new UriTemplate(path));