Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Oct 26, 2018
1 parent e68bf01 commit 3fee8cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -96,7 +96,7 @@ protected Mono<String> resolveUrlPath(String resourcePath, ServerWebExchange exc
*/
protected String toAbsolutePath(String path, ServerWebExchange exchange) {
String requestPath = exchange.getRequest().getURI().getPath();
String absolutePath = path.startsWith("/") ? path : StringUtils.applyRelativePath(requestPath, path);
String absolutePath = (path.startsWith("/") ? path : StringUtils.applyRelativePath(requestPath, path));
return StringUtils.cleanPath(absolutePath);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -95,7 +95,7 @@ protected String resolveUrlPath(String resourcePath, HttpServletRequest request,
*/
protected String toAbsolutePath(String path, HttpServletRequest request) {
String absolutePath = path;
if(!path.startsWith("/")) {
if (!path.startsWith("/")) {
ResourceUrlProvider urlProvider = findResourceUrlProvider(request);
Assert.state(urlProvider != null, "No ResourceUrlProvider");
String requestPath = urlProvider.getUrlPathHelper().getRequestUri(request);
Expand Down

0 comments on commit 3fee8cb

Please sign in to comment.