diff --git a/client/pom.xml b/client/pom.xml index da8ae33e0..1d12fea24 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -73,7 +73,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.0.0 + 3.1.0 ${project.parent.basedir}/nebula_java_style_checks.xml @@ -104,7 +104,7 @@ com.puppycrawl.tools checkstyle - 8.18 + 8.29 diff --git a/client/src/main/java/com/vesoft/nebula/AbstractClient.java b/client/src/main/java/com/vesoft/nebula/AbstractClient.java index 904519723..871708c9f 100644 --- a/client/src/main/java/com/vesoft/nebula/AbstractClient.java +++ b/client/src/main/java/com/vesoft/nebula/AbstractClient.java @@ -11,12 +11,10 @@ import com.facebook.thrift.TException; import com.facebook.thrift.protocol.TProtocol; import com.facebook.thrift.transport.TTransport; - import com.google.common.collect.Lists; import com.google.common.net.HostAndPort; import com.google.common.net.InetAddresses; import com.vesoft.nebula.graph.ErrorCode; - import java.util.ArrayList; import java.util.List; diff --git a/client/src/main/java/com/vesoft/nebula/Cluster.java b/client/src/main/java/com/vesoft/nebula/Cluster.java index f16829431..e3b2c583f 100644 --- a/client/src/main/java/com/vesoft/nebula/Cluster.java +++ b/client/src/main/java/com/vesoft/nebula/Cluster.java @@ -11,7 +11,6 @@ import com.google.common.base.Strings; import com.google.common.collect.Lists; import com.google.common.net.HostAndPort; - import com.vesoft.nebula.session.Session; import java.util.List; diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/ResultSet.java b/client/src/main/java/com/vesoft/nebula/client/graph/ResultSet.java index 18ebf25f8..72b30d5c4 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/ResultSet.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/ResultSet.java @@ -8,7 +8,6 @@ import com.google.common.collect.Lists; import com.vesoft.nebula.graph.RowValue; - import java.util.Iterator; import java.util.List; diff --git a/client/src/main/java/com/vesoft/nebula/client/meta/MetaClientImpl.java b/client/src/main/java/com/vesoft/nebula/client/meta/MetaClientImpl.java index e9470e3b8..86e0316dc 100644 --- a/client/src/main/java/com/vesoft/nebula/client/meta/MetaClientImpl.java +++ b/client/src/main/java/com/vesoft/nebula/client/meta/MetaClientImpl.java @@ -35,7 +35,7 @@ import com.vesoft.nebula.meta.TagItem; import com.vesoft.nebula.utils.AddressUtil; import com.vesoft.nebula.utils.NebulaTypeUtil; - +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; diff --git a/client/src/main/java/com/vesoft/nebula/client/meta/async/AsyncMetaClientImpl.java b/client/src/main/java/com/vesoft/nebula/client/meta/async/AsyncMetaClientImpl.java index 87c603323..2bdb13c6a 100644 --- a/client/src/main/java/com/vesoft/nebula/client/meta/async/AsyncMetaClientImpl.java +++ b/client/src/main/java/com/vesoft/nebula/client/meta/async/AsyncMetaClientImpl.java @@ -22,7 +22,6 @@ import com.vesoft.nebula.meta.ListTagsReq; import com.vesoft.nebula.meta.ListTagsResp; import com.vesoft.nebula.meta.MetaService; - import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListEdgesResult.java b/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListEdgesResult.java index 36c973896..267798176 100644 --- a/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListEdgesResult.java +++ b/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListEdgesResult.java @@ -8,7 +8,6 @@ import com.google.common.collect.Maps; import com.vesoft.nebula.meta.EdgeItem; - import java.util.Map; public class ListEdgesResult { diff --git a/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListSpaceResult.java b/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListSpaceResult.java index d507eb932..0d6998ed7 100644 --- a/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListSpaceResult.java +++ b/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListSpaceResult.java @@ -8,7 +8,6 @@ import com.google.common.collect.Maps; import com.vesoft.nebula.meta.ID; - import java.util.Map; public class ListSpaceResult { diff --git a/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListTagsResult.java b/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListTagsResult.java index 55e37d5fd..58fc04be6 100644 --- a/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListTagsResult.java +++ b/client/src/main/java/com/vesoft/nebula/client/meta/entry/ListTagsResult.java @@ -8,7 +8,6 @@ import com.google.common.collect.Maps; import com.vesoft.nebula.meta.TagItem; - import java.util.Map; public class ListTagsResult { diff --git a/client/src/main/java/com/vesoft/nebula/client/storage/processor/Processor.java b/client/src/main/java/com/vesoft/nebula/client/storage/processor/Processor.java index be53bfb70..66051c19e 100644 --- a/client/src/main/java/com/vesoft/nebula/client/storage/processor/Processor.java +++ b/client/src/main/java/com/vesoft/nebula/client/storage/processor/Processor.java @@ -9,7 +9,6 @@ import com.vesoft.nebula.data.Result; import com.vesoft.nebula.data.Row; import com.vesoft.nebula.storage.ScanEdgeResponse; - import java.util.List; import java.util.Map; diff --git a/client/src/main/java/com/vesoft/nebula/client/storage/processor/ScanEdgeProcessor.java b/client/src/main/java/com/vesoft/nebula/client/storage/processor/ScanEdgeProcessor.java index 599a4293f..67c4b8ae9 100644 --- a/client/src/main/java/com/vesoft/nebula/client/storage/processor/ScanEdgeProcessor.java +++ b/client/src/main/java/com/vesoft/nebula/client/storage/processor/ScanEdgeProcessor.java @@ -15,12 +15,10 @@ import com.vesoft.nebula.meta.EdgeItem; import com.vesoft.nebula.storage.ScanEdge; import com.vesoft.nebula.storage.ScanEdgeResponse; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/client/src/main/java/com/vesoft/nebula/client/storage/processor/ScanVertexProcessor.java b/client/src/main/java/com/vesoft/nebula/client/storage/processor/ScanVertexProcessor.java index 736fd35d8..5f7dc515e 100644 --- a/client/src/main/java/com/vesoft/nebula/client/storage/processor/ScanVertexProcessor.java +++ b/client/src/main/java/com/vesoft/nebula/client/storage/processor/ScanVertexProcessor.java @@ -15,12 +15,10 @@ import com.vesoft.nebula.meta.TagItem; import com.vesoft.nebula.storage.ScanVertex; import com.vesoft.nebula.storage.ScanVertexResponse; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/client/src/main/java/com/vesoft/nebula/data/RowReader.java b/client/src/main/java/com/vesoft/nebula/data/RowReader.java index b33f48b7f..cb80a077c 100644 --- a/client/src/main/java/com/vesoft/nebula/data/RowReader.java +++ b/client/src/main/java/com/vesoft/nebula/data/RowReader.java @@ -12,7 +12,6 @@ import com.vesoft.nebula.Schema; import com.vesoft.nebula.data.PropertyDef.PropertyType; import com.vesoft.nebula.utils.NativeUtils; - import java.io.IOException; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; @@ -21,7 +20,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/client/src/main/java/com/vesoft/nebula/entry/AbstractNebulaCallback.java b/client/src/main/java/com/vesoft/nebula/entry/AbstractNebulaCallback.java index f9f2f6eed..0dab22ddb 100644 --- a/client/src/main/java/com/vesoft/nebula/entry/AbstractNebulaCallback.java +++ b/client/src/main/java/com/vesoft/nebula/entry/AbstractNebulaCallback.java @@ -11,9 +11,7 @@ import com.facebook.thrift.async.AsyncMethodCallback; import com.facebook.thrift.async.TAsyncMethodCall; import com.google.common.base.Optional; - import java.util.concurrent.atomic.AtomicBoolean; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/client/src/main/java/com/vesoft/nebula/utils/NativeUtils.java b/client/src/main/java/com/vesoft/nebula/utils/NativeUtils.java index 6cf0022e3..525908b9b 100644 --- a/client/src/main/java/com/vesoft/nebula/utils/NativeUtils.java +++ b/client/src/main/java/com/vesoft/nebula/utils/NativeUtils.java @@ -6,7 +6,6 @@ import java.io.InputStream; import java.nio.file.Files; import java.nio.file.StandardCopyOption; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/examples/pom.xml b/examples/pom.xml index 8e21e305d..0d041c169 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -47,7 +47,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.0.0 + 3.1.0 ${project.parent.basedir}/nebula_java_style_checks.xml @@ -75,7 +75,7 @@ com.puppycrawl.tools checkstyle - 8.18 + 8.29 diff --git a/examples/src/main/java/com/vesoft/nebula/examples/ScanEdgeInSpaceExample.java b/examples/src/main/java/com/vesoft/nebula/examples/ScanEdgeInSpaceExample.java index d63051eab..f99ce350e 100644 --- a/examples/src/main/java/com/vesoft/nebula/examples/ScanEdgeInSpaceExample.java +++ b/examples/src/main/java/com/vesoft/nebula/examples/ScanEdgeInSpaceExample.java @@ -14,7 +14,6 @@ import com.vesoft.nebula.data.Result; import com.vesoft.nebula.data.Row; import com.vesoft.nebula.storage.ScanEdgeResponse; - import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; @@ -22,7 +21,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; - import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVPrinter; import org.slf4j.Logger; diff --git a/examples/src/main/java/com/vesoft/nebula/examples/ScanVertexInPartExample.java b/examples/src/main/java/com/vesoft/nebula/examples/ScanVertexInPartExample.java index e818c794f..50d4e64c7 100644 --- a/examples/src/main/java/com/vesoft/nebula/examples/ScanVertexInPartExample.java +++ b/examples/src/main/java/com/vesoft/nebula/examples/ScanVertexInPartExample.java @@ -14,13 +14,11 @@ import com.vesoft.nebula.client.storage.processor.ScanVertexProcessor; import com.vesoft.nebula.data.Result; import com.vesoft.nebula.storage.ScanVertexResponse; - import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/examples/src/main/java/com/vesoft/nebula/examples/SparkExample.java b/examples/src/main/java/com/vesoft/nebula/examples/SparkExample.java index bab5a16a7..e8b9e644c 100644 --- a/examples/src/main/java/com/vesoft/nebula/examples/SparkExample.java +++ b/examples/src/main/java/com/vesoft/nebula/examples/SparkExample.java @@ -6,7 +6,6 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; - import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.JavaSparkContext; diff --git a/nebula_java_style_checks.xml b/nebula_java_style_checks.xml index 0834f7982..94e0865cd 100644 --- a/nebula_java_style_checks.xml +++ b/nebula_java_style_checks.xml @@ -5,13 +5,11 @@ @@ -21,12 +19,30 @@ + + + + + + + + + + + - + + + + + + + @@ -41,20 +57,28 @@ - - - - - + + + - - + + + + + + + INSTANCE_INIT, ANNOTATION_DEF, ENUM_DEF"/> + + + @@ -121,11 +157,12 @@ value="Package name ''{0}'' must match pattern ''{1}''."/> + - + @@ -145,7 +182,6 @@ value="Catch parameter name ''{0}'' must match pattern ''{1}''."/> - @@ -187,6 +223,9 @@ + @@ -194,14 +233,25 @@ + + + + - - + + + + + + + + + + + + + + + + - + + + + + + + +