From 9c679fccdfdec695da82528b4d0b4138b5b57308 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Fri, 16 Feb 2018 12:34:25 -0500 Subject: [PATCH] Fix intdentation --- .../web/filter/ForwardedHeaderFilter.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java b/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java index 82fa047e427..e7e627bb968 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java @@ -307,41 +307,41 @@ public class ForwardedHeaderFilter extends OncePerRequestFilter { this.request = request; } -@Override -public void sendRedirect(String location) throws IOException { + @Override + public void sendRedirect(String location) throws IOException { - UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(location); - UriComponents uriComponents = builder.build(); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(location); + UriComponents uriComponents = builder.build(); - // Absolute location - if (uriComponents.getScheme() != null) { - super.sendRedirect(location); - return; - } + // Absolute location + if (uriComponents.getScheme() != null) { + super.sendRedirect(location); + return; + } - // Network-path reference - if (location.startsWith("//")) { - String scheme = this.request.getScheme(); - super.sendRedirect(builder.scheme(scheme).toUriString()); - return; - } + // Network-path reference + if (location.startsWith("//")) { + String scheme = this.request.getScheme(); + super.sendRedirect(builder.scheme(scheme).toUriString()); + return; + } - String path = uriComponents.getPath(); - if (path != null) { - // Relative to Servlet container root or to current request - path = (path.startsWith(FOLDER_SEPARATOR) ? path : - StringUtils.applyRelativePath(this.request.getRequestURI(), path)); - } + String path = uriComponents.getPath(); + if (path != null) { + // Relative to Servlet container root or to current request + path = (path.startsWith(FOLDER_SEPARATOR) ? path : + StringUtils.applyRelativePath(this.request.getRequestURI(), path)); + } - String result = UriComponentsBuilder - .fromHttpRequest(new ServletServerHttpRequest(this.request)) - .replacePath(path) - .replaceQuery(uriComponents.getQuery()) - .fragment(uriComponents.getFragment()) - .build().normalize().toUriString(); + String result = UriComponentsBuilder + .fromHttpRequest(new ServletServerHttpRequest(this.request)) + .replacePath(path) + .replaceQuery(uriComponents.getQuery()) + .fragment(uriComponents.getFragment()) + .build().normalize().toUriString(); - super.sendRedirect(result); -} + super.sendRedirect(result); + } } }