all;
-
+
public People() {}
}
diff --git a/samples/concurrent-modification/src/main/java/io/dgraph/example/Person.java b/samples/concurrent-modification/src/main/java/io/dgraph/example/Person.java
index 63a4e15a..e4938135 100644
--- a/samples/concurrent-modification/src/main/java/io/dgraph/example/Person.java
+++ b/samples/concurrent-modification/src/main/java/io/dgraph/example/Person.java
@@ -8,6 +8,5 @@ public class Person {
/*
* Empty constructor
*/
- public Person() {
- }
+ public Person() {}
}
diff --git a/src/main/java/io/dgraph/DgraphClient.java b/src/main/java/io/dgraph/DgraphClient.java
index c6f36e72..11a436c1 100644
--- a/src/main/java/io/dgraph/DgraphClient.java
+++ b/src/main/java/io/dgraph/DgraphClient.java
@@ -18,11 +18,9 @@
import io.dgraph.DgraphProto.Operation;
import io.dgraph.DgraphProto.TxnContext;
import io.dgraph.DgraphProto.Version;
-
import io.grpc.ManagedChannelBuilder;
import io.grpc.Metadata;
import io.grpc.stub.MetadataUtils;
-
import java.net.MalformedURLException;
import java.net.URL;
@@ -46,8 +44,8 @@ public class DgraphClient {
* Creates a gRPC stub that can be used to construct clients to connect with Slash GraphQL.
*
* @param slashEndpoint The url of the Slash GraphQL endpoint. Example:
- * https://your-slash-instance.cloud.dgraph.io/graphql
- * @param apiKey The API key used to connect to your Slash GraphQL instance.
+ * https://your-slash-instance.cloud.dgraph.io/graphql
+ * @param apiKey The API key used to connect to your Slash GraphQL instance.
* @return A new DgraphGrpc.DgraphStub object to be used with DgraphClient/DgraphAsyncClient.
*/
public static DgraphGrpc.DgraphStub clientStubFromSlashEndpoint(
@@ -59,8 +57,8 @@ public static DgraphGrpc.DgraphStub clientStubFromSlashEndpoint(
String gRPCAddress = parts[0] + ".grpc." + parts[1];
Metadata metadata = new Metadata();
- metadata.put(Metadata.Key.of(gRPC_AUTHORIZATION_HEADER_NAME,
- Metadata.ASCII_STRING_MARSHALLER), apiKey);
+ metadata.put(
+ Metadata.Key.of(gRPC_AUTHORIZATION_HEADER_NAME, Metadata.ASCII_STRING_MARSHALLER), apiKey);
return MetadataUtils.attachHeaders(
DgraphGrpc.newStub(
ManagedChannelBuilder.forAddress(gRPCAddress, 443).useTransportSecurity().build()),
@@ -73,7 +71,7 @@ public static DgraphGrpc.DgraphStub clientStubFromSlashEndpoint(
* A single client is thread safe.
*
* @param stubs - an array of grpc stubs to be used by this client. The stubs to be used are
- * chosen at random per transaction.
+ * chosen at random per transaction.
*/
public DgraphClient(DgraphGrpc.DgraphStub... stubs) {
this.asyncClient = new DgraphAsyncClient(stubs);
@@ -177,7 +175,7 @@ public Version checkVersion() {
* access JWT and a refresh JWT, which will be stored in the jwt field of this class, and used for
* authorizing all subsequent requests sent to the server.
*
- * @param userid the id of the user who is trying to login, e.g. Alice
+ * @param userid the id of the user who is trying to login, e.g. Alice
* @param password the password of the user
*/
public void login(String userid, String password) {
diff --git a/src/test/java/io/dgraph/DgraphClientTest.java b/src/test/java/io/dgraph/DgraphClientTest.java
index 74a44fd3..72d35ee7 100644
--- a/src/test/java/io/dgraph/DgraphClientTest.java
+++ b/src/test/java/io/dgraph/DgraphClientTest.java
@@ -15,6 +15,9 @@
*/
package io.dgraph;
+import static org.testng.Assert.*;
+import static org.testng.Assert.fail;
+
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.protobuf.ByteString;
@@ -22,17 +25,12 @@
import io.dgraph.DgraphProto.Operation;
import io.dgraph.DgraphProto.Response;
import io.dgraph.DgraphProto.TxnContext;
-
import java.net.MalformedURLException;
import java.util.Collections;
import java.util.Map;
-
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import static org.testng.Assert.*;
-import static org.testng.Assert.fail;
-
/**
* @author Edgar Rodriguez-Diaz
* @author Deepak Jois
@@ -157,8 +155,8 @@ public void testCheckVersion() {
@Test
public void testFromSlashEndpoint_ValidURL() {
try {
- DgraphClient.clientStubFromSlashEndpoint("https://your-slash-instance.cloud.dgraph" +
- ".io/graphql", "");
+ DgraphClient.clientStubFromSlashEndpoint(
+ "https://your-slash-instance.cloud.dgraph.io/graphql", "");
} catch (MalformedURLException e) {
fail(e.getMessage());
}