Skip to content

Commit 3fee8cb

Browse files
committed
Polishing
1 parent e68bf01 commit 3fee8cb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/resource/ResourceTransformerSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -96,7 +96,7 @@ protected Mono<String> resolveUrlPath(String resourcePath, ServerWebExchange exc
9696
*/
9797
protected String toAbsolutePath(String path, ServerWebExchange exchange) {
9898
String requestPath = exchange.getRequest().getURI().getPath();
99-
String absolutePath = path.startsWith("/") ? path : StringUtils.applyRelativePath(requestPath, path);
99+
String absolutePath = (path.startsWith("/") ? path : StringUtils.applyRelativePath(requestPath, path));
100100
return StringUtils.cleanPath(absolutePath);
101101
}
102102

spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@ protected String resolveUrlPath(String resourcePath, HttpServletRequest request,
9595
*/
9696
protected String toAbsolutePath(String path, HttpServletRequest request) {
9797
String absolutePath = path;
98-
if(!path.startsWith("/")) {
98+
if (!path.startsWith("/")) {
9999
ResourceUrlProvider urlProvider = findResourceUrlProvider(request);
100100
Assert.state(urlProvider != null, "No ResourceUrlProvider");
101101
String requestPath = urlProvider.getUrlPathHelper().getRequestUri(request);

0 commit comments

Comments
 (0)