Retain original case when mapping endpoint paths

Update `MappingWebEndpointPathMapper` to keep the original case rather
than using a lower-case version.

Closes gh-14773
This commit is contained in:
Phillip Webb 2018-10-15 14:12:12 -07:00
parent 935d621a42
commit b25e222136
3 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ class MappingWebEndpointPathMapper implements PathMapper {
@Override
public String getRootPath(EndpointId endpointId) {
return this.pathMapping.getOrDefault(endpointId, endpointId.toLowerCaseString());
return this.pathMapping.getOrDefault(endpointId, endpointId.toString());
}
}

View File

@ -50,7 +50,7 @@ public class MappingWebEndpointPathMapperTests {
MappingWebEndpointPathMapper mapper = new MappingWebEndpointPathMapper(
Collections.emptyMap());
assertThat(mapper.getRootPath(EndpointId.of("testEndpoint")))
.isEqualTo("testendpoint");
.isEqualTo("testEndpoint");
}
@Test

View File

@ -63,7 +63,7 @@ public interface PathMapper {
@Override
public String getRootPath(EndpointId endpointId) {
return endpointId.toLowerCaseString();
return endpointId.toString();
}
};