Format with google-java-format
Change-Id: Ie4f4fdc45f6b6563158a8f52a27a59282a0c5d43
diff --git a/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java b/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java
index 204bdbc..9dd7e54 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java
@@ -19,9 +19,7 @@
import com.google.gerrit.httpd.WebSession;
import com.google.inject.Inject;
import com.google.inject.Singleton;
-
import java.io.IOException;
-
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
@@ -31,21 +29,18 @@
@Singleton
public class LoginRedirectFilter extends AllRequestFilter {
- @Inject
- private DynamicItem<WebSession> sessionProvider;
+ @Inject private DynamicItem<WebSession> sessionProvider;
@Override
- public void doFilter(ServletRequest request, ServletResponse response,
- FilterChain chain) throws IOException, ServletException {
- HttpServletRequest httpReq = (HttpServletRequest)request;
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+ throws IOException, ServletException {
+ HttpServletRequest httpReq = (HttpServletRequest) request;
String path = httpReq.getRequestURI();
if (!httpReq.getContextPath().isEmpty()) {
path = path.substring(httpReq.getContextPath().length());
}
- if (path.startsWith("/login") ||
- path.startsWith("/a/") ||
- sessionProvider.get().isSignedIn()) {
+ if (path.startsWith("/login") || path.startsWith("/a/") || sessionProvider.get().isSignedIn()) {
chain.doFilter(request, response);
} else {
((HttpServletResponse) response).sendRedirect(getLoginRedirectUrl(httpReq));
diff --git a/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectModule.java b/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectModule.java
index 387ba01..7266c5d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectModule.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectModule.java
@@ -18,7 +18,6 @@
import com.google.gerrit.httpd.plugins.HttpPluginModule;
import com.google.inject.Scopes;
-
public class LoginRedirectModule extends HttpPluginModule {
@Override
protected void configureServlets() {