Format Java files with google-java-format 1.7
Change-Id: Ia3f9bc1cb0d08945b0059ce796162b65e5feb3eb
diff --git a/java/com/google/gitiles/GitwebRedirectFilter.java b/java/com/google/gitiles/GitwebRedirectFilter.java
index 324af72..0d0c74f 100644
--- a/java/com/google/gitiles/GitwebRedirectFilter.java
+++ b/java/com/google/gitiles/GitwebRedirectFilter.java
@@ -25,8 +25,8 @@
import com.google.common.collect.Iterables;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.ListMultimap;
-import com.google.gitiles.GitilesView.InvalidViewException;
import com.google.gitiles.GitilesRequestFailureException.FailureReason;
+import com.google.gitiles.GitilesView.InvalidViewException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
diff --git a/java/com/google/gitiles/HostIndexServlet.java b/java/com/google/gitiles/HostIndexServlet.java
index ce2ec6b..15ad75d 100644
--- a/java/com/google/gitiles/HostIndexServlet.java
+++ b/java/com/google/gitiles/HostIndexServlet.java
@@ -88,8 +88,7 @@
GitilesView view = ViewFilter.getView(req);
String prefix = view.getRepositoryPrefix();
if (prefix != null) {
- Map<String, RepositoryDescription> descs =
- list(req, res, prefix, Collections.emptySet());
+ Map<String, RepositoryDescription> descs = list(req, res, prefix, Collections.emptySet());
if (descs == null) {
return;
}
diff --git a/java/com/google/gitiles/blame/BlameServlet.java b/java/com/google/gitiles/blame/BlameServlet.java
index f1b9976..3fa84fb 100644
--- a/java/com/google/gitiles/blame/BlameServlet.java
+++ b/java/com/google/gitiles/blame/BlameServlet.java
@@ -26,10 +26,10 @@
import com.google.gitiles.DateFormatter;
import com.google.gitiles.DateFormatter.Format;
import com.google.gitiles.GitilesAccess;
-import com.google.gitiles.GitilesView;
-import com.google.gitiles.Renderer;
import com.google.gitiles.GitilesRequestFailureException;
import com.google.gitiles.GitilesRequestFailureException.FailureReason;
+import com.google.gitiles.GitilesView;
+import com.google.gitiles.Renderer;
import com.google.gitiles.ViewFilter;
import com.google.gitiles.blame.cache.BlameCache;
import com.google.gitiles.blame.cache.Region;
diff --git a/java/com/google/gitiles/doc/DocServlet.java b/java/com/google/gitiles/doc/DocServlet.java
index 509f460..5b5c663 100644
--- a/java/com/google/gitiles/doc/DocServlet.java
+++ b/java/com/google/gitiles/doc/DocServlet.java
@@ -14,8 +14,6 @@
package com.google.gitiles.doc;
-import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
-import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;
import static javax.servlet.http.HttpServletResponse.SC_NOT_MODIFIED;
import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
import static org.eclipse.jgit.lib.FileMode.TYPE_FILE;
@@ -30,10 +28,10 @@
import com.google.common.net.HttpHeaders;
import com.google.gitiles.BaseServlet;
import com.google.gitiles.GitilesAccess;
+import com.google.gitiles.GitilesRequestFailureException;
+import com.google.gitiles.GitilesRequestFailureException.FailureReason;
import com.google.gitiles.GitilesView;
import com.google.gitiles.Renderer;
-import com.google.gitiles.GitilesRequestFailureException.FailureReason;
-import com.google.gitiles.GitilesRequestFailureException;
import com.google.gitiles.ViewFilter;
import com.google.gitiles.doc.html.StreamHtmlBuilder;
import java.io.IOException;
diff --git a/javatests/com/google/gitiles/ViewFilterTest.java b/javatests/com/google/gitiles/ViewFilterTest.java
index d25b6cf..66cd5d8 100644
--- a/javatests/com/google/gitiles/ViewFilterTest.java
+++ b/javatests/com/google/gitiles/ViewFilterTest.java
@@ -251,7 +251,8 @@
assertThat(view.getRevision().getId()).isEqualTo(master);
assertThat(view.getPathPart()).isEqualTo("foo/bar");
- assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+show/stable..master/foo"));
+ assertThrows(
+ GitilesRequestFailureException.class, () -> getView("/repo/+show/stable..master/foo"));
}
@Test
@@ -280,7 +281,8 @@
assertThat(view.getRevision().getId()).isEqualTo(master);
assertThat(view.getPathPart()).isEqualTo("foo/bar.md");
- assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+doc/stable..master/foo"));
+ assertThrows(
+ GitilesRequestFailureException.class, () -> getView("/repo/+doc/stable..master/foo"));
}
@Test
@@ -290,7 +292,8 @@
assertThat(getView("//repo").getType()).isEqualTo(Type.REPOSITORY_INDEX);
assertThat(getView("//repo//").getType()).isEqualTo(Type.REPOSITORY_INDEX);
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+//master"));
- assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+/refs//heads//master"));
+ assertThrows(
+ GitilesRequestFailureException.class, () -> getView("/repo/+/refs//heads//master"));
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+//master//"));
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+//master/foo//bar"));
}
@@ -423,11 +426,14 @@
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+archive"));
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+archive/"));
- assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+archive/master..branch"));
+ assertThrows(
+ GitilesRequestFailureException.class, () -> getView("/repo/+archive/master..branch"));
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+archive/master.foo"));
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+archive/master.zip"));
- assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+archive/master/.tar.gz"));
- assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+archive/master/foo/.tar.gz"));
+ assertThrows(
+ GitilesRequestFailureException.class, () -> getView("/repo/+archive/master/.tar.gz"));
+ assertThrows(
+ GitilesRequestFailureException.class, () -> getView("/repo/+archive/master/foo/.tar.gz"));
view = getView("/repo/+archive/master.tar.gz");
assertThat(view.getType()).isEqualTo(Type.ARCHIVE);
@@ -466,7 +472,8 @@
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+blame"));
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+blame/"));
assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+blame/master"));
- assertThrows(GitilesRequestFailureException.class, () -> getView("/repo/+blame/master..branch"));
+ assertThrows(
+ GitilesRequestFailureException.class, () -> getView("/repo/+blame/master..branch"));
view = getView("/repo/+blame/master/foo/bar");
assertThat(view.getType()).isEqualTo(Type.BLAME);