diff --git a/language/snippets/src/main/java/com/example/language/QuickstartSample.java b/language/snippets/src/main/java/com/example/language/QuickstartSample.java index 85f516bd1ef..c264dc96dd6 100644 --- a/language/snippets/src/main/java/com/example/language/QuickstartSample.java +++ b/language/snippets/src/main/java/com/example/language/QuickstartSample.java @@ -30,8 +30,7 @@ public static void main(String... args) throws Exception { // The text to analyze String text = "Hello, world!"; - Document doc = Document.newBuilder() - .setContent(text).setType(Type.PLAIN_TEXT).build(); + Document doc = Document.newBuilder().setContent(text).setType(Type.PLAIN_TEXT).build(); // Detects the sentiment of the text Sentiment sentiment = language.analyzeSentiment(doc).getDocumentSentiment(); diff --git a/language/snippets/src/main/java/com/example/language/SetEndpoint.java b/language/snippets/src/main/java/com/example/language/SetEndpoint.java index 618d91b4259..73ab525a4fb 100644 --- a/language/snippets/src/main/java/com/example/language/SetEndpoint.java +++ b/language/snippets/src/main/java/com/example/language/SetEndpoint.java @@ -20,7 +20,6 @@ import com.google.cloud.language.v1.LanguageServiceClient; import com.google.cloud.language.v1.LanguageServiceSettings; import com.google.cloud.language.v1.Sentiment; - import java.io.IOException; class SetEndpoint { @@ -28,9 +27,8 @@ class SetEndpoint { // Change your endpoint static void setEndpoint() throws IOException { // [START language_set_endpoint] - LanguageServiceSettings settings = LanguageServiceSettings.newBuilder() - .setEndpoint("eu-language.googleapis.com:443") - .build(); + LanguageServiceSettings settings = + LanguageServiceSettings.newBuilder().setEndpoint("eu-language.googleapis.com:443").build(); // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call @@ -40,8 +38,7 @@ static void setEndpoint() throws IOException { // The text to analyze String text = "Hello, world!"; - Document doc = Document.newBuilder() - .setContent(text).setType(Document.Type.PLAIN_TEXT).build(); + Document doc = Document.newBuilder().setContent(text).setType(Document.Type.PLAIN_TEXT).build(); // Detects the sentiment of the text Sentiment sentiment = client.analyzeSentiment(doc).getDocumentSentiment(); diff --git a/language/snippets/src/test/java/com/example/language/QuickstartSampleIT.java b/language/snippets/src/test/java/com/example/language/QuickstartSampleIT.java index 4fad6479404..9f335c78a5b 100644 --- a/language/snippets/src/test/java/com/example/language/QuickstartSampleIT.java +++ b/language/snippets/src/test/java/com/example/language/QuickstartSampleIT.java @@ -26,9 +26,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** - * Tests for quickstart sample. - */ +/** Tests for quickstart sample. */ @RunWith(JUnit4.class) @SuppressWarnings("checkstyle:abbreviationaswordinname") public class QuickstartSampleIT { diff --git a/language/snippets/src/test/java/com/example/language/SetEndpointIT.java b/language/snippets/src/test/java/com/example/language/SetEndpointIT.java index 1a8bbc50636..df570711337 100644 --- a/language/snippets/src/test/java/com/example/language/SetEndpointIT.java +++ b/language/snippets/src/test/java/com/example/language/SetEndpointIT.java @@ -21,7 +21,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; - import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -36,7 +35,6 @@ public class SetEndpointIT { private ByteArrayOutputStream bout; private PrintStream out; - @Before public void setUp() { bout = new ByteArrayOutputStream(); @@ -49,7 +47,6 @@ public void tearDown() { System.setOut(null); } - @Test public void testSetEndpoint() throws IOException { // Act