Format Java files with google-java-format
Change-Id: Ib3ce9f4feece92e31975a4f8a913d1c6734faa50
diff --git a/src/main/java/com/ericsson/gerrit/plugins/goimport/GoImportFilter.java b/src/main/java/com/ericsson/gerrit/plugins/goimport/GoImportFilter.java
index d321774..dc74595 100644
--- a/src/main/java/com/ericsson/gerrit/plugins/goimport/GoImportFilter.java
+++ b/src/main/java/com/ericsson/gerrit/plugins/goimport/GoImportFilter.java
@@ -29,8 +29,8 @@
import com.google.gerrit.server.project.ProjectState;
import com.google.gerrit.util.http.CacheHeaders;
import com.google.inject.Inject;
-import com.google.inject.Singleton;
import com.google.inject.Provider;
+import com.google.inject.Singleton;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URI;
@@ -174,7 +174,7 @@
+ (authenticated ? "a/" : "")
+ projectName
+ " git "
- + getRepoRoot(projectName, authenticated);
+ + getRepoRoot(projectName, authenticated);
}
private String getRepoRoot(String projectName, boolean authenticated) {
diff --git a/src/test/java/com/ericsson/gerrit/plugins/goimport/GoImportFilterTest.java b/src/test/java/com/ericsson/gerrit/plugins/goimport/GoImportFilterTest.java
index b659ba5..8eed5a0 100644
--- a/src/test/java/com/ericsson/gerrit/plugins/goimport/GoImportFilterTest.java
+++ b/src/test/java/com/ericsson/gerrit/plugins/goimport/GoImportFilterTest.java
@@ -64,9 +64,9 @@
private static byte[] response200(boolean allowAnon, boolean authenticated) {
if (authenticated) {
- return PAGE_200.replace(CONTENT_PLH, AUTH_CONTENT).getBytes();
+ return PAGE_200.replace(CONTENT_PLH, AUTH_CONTENT).getBytes();
} else if (allowAnon) {
- return PAGE_200.replace(CONTENT_PLH, ANON_CONTENT).getBytes();
+ return PAGE_200.replace(CONTENT_PLH, ANON_CONTENT).getBytes();
}
return PAGE_200.replace(CONTENT_PLH, CONTENT).getBytes();
}
@@ -99,22 +99,19 @@
@Test
public void testConstructor() throws Exception {
assertThat(unitUnderTest.webUrl.endsWith("/")).isTrue();
- unitUnderTest = new GoImportFilter(
- mockAnonProvider,
- mockPerms,
- mockProjectCache,
- "http://gerrit-review.googlesource.com:8080/");
+ unitUnderTest =
+ new GoImportFilter(
+ mockAnonProvider,
+ mockPerms,
+ mockProjectCache,
+ "http://gerrit-review.googlesource.com:8080/");
assertThat(unitUnderTest.webUrl.endsWith("/")).isTrue();
assertThat(unitUnderTest.projectPrefix).isNotNull();
}
@Test(expected = URISyntaxException.class)
public void testConstructorWithURISyntaxException() throws Exception {
- unitUnderTest = new GoImportFilter(
- mockAnonProvider,
- mockPerms,
- mockProjectCache,
- "\\\\");
+ unitUnderTest = new GoImportFilter(mockAnonProvider, mockPerms, mockProjectCache, "\\\\");
}
@Test