You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/06/05 09:03:26 UTC

[GitHub] [incubator-hugegraph] javeme commented on a diff in pull request #1896: fix redundant Checkstyle

javeme commented on code in PR #1896:
URL: https://github.com/apache/incubator-hugegraph/pull/1896#discussion_r889668115


##########
hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java:
##########
@@ -43,36 +43,36 @@
 
 public interface HugeAuthenticator extends Authenticator {
 
-    public static final String KEY_USERNAME =
-                               CredentialGraphTokens.PROPERTY_USERNAME;
-    public static final String KEY_PASSWORD =
-                               CredentialGraphTokens.PROPERTY_PASSWORD;
-    public static final String KEY_TOKEN = "token";
-    public static final String KEY_ROLE = "role";
-    public static final String KEY_ADDRESS = "address";
-    public static final String KEY_PATH = "path";
-
-    public static final String USER_SYSTEM = "system";
-    public static final String USER_ADMIN = "admin";
-    public static final String USER_ANONY = AuthenticatedUser.ANONYMOUS_USERNAME;
-
-    public static final RolePermission ROLE_NONE = RolePermission.none();
-    public static final RolePermission ROLE_ADMIN = RolePermission.admin();
-
-    public static final String VAR_PREFIX = "$";
-    public static final String KEY_OWNER = VAR_PREFIX + "owner";
-    public static final String KEY_DYNAMIC = VAR_PREFIX + "dynamic";
-    public static final String KEY_ACTION = VAR_PREFIX + "action";
-
-    public void setup(HugeConfig config);
-
-    public UserWithRole authenticate(String username, String password,
+    String KEY_USERNAME =
+           CredentialGraphTokens.PROPERTY_USERNAME;

Review Comment:
   can move to the previous line



##########
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java:
##########
@@ -331,19 +331,19 @@ public long storeSize(String table) throws IOException {
         /**
          * Add a row record to a table
          */
-        public abstract void put(String table, byte[] family, byte[] rowkey,
+        void put(String table, byte[] family, byte[] rowkey,

Review Comment:
   ditto



##########
hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java:
##########
@@ -43,36 +43,36 @@
 
 public interface HugeAuthenticator extends Authenticator {
 
-    public static final String KEY_USERNAME =
-                               CredentialGraphTokens.PROPERTY_USERNAME;
-    public static final String KEY_PASSWORD =
-                               CredentialGraphTokens.PROPERTY_PASSWORD;
-    public static final String KEY_TOKEN = "token";
-    public static final String KEY_ROLE = "role";
-    public static final String KEY_ADDRESS = "address";
-    public static final String KEY_PATH = "path";
-
-    public static final String USER_SYSTEM = "system";
-    public static final String USER_ADMIN = "admin";
-    public static final String USER_ANONY = AuthenticatedUser.ANONYMOUS_USERNAME;
-
-    public static final RolePermission ROLE_NONE = RolePermission.none();
-    public static final RolePermission ROLE_ADMIN = RolePermission.admin();
-
-    public static final String VAR_PREFIX = "$";
-    public static final String KEY_OWNER = VAR_PREFIX + "owner";
-    public static final String KEY_DYNAMIC = VAR_PREFIX + "dynamic";
-    public static final String KEY_ACTION = VAR_PREFIX + "action";
-
-    public void setup(HugeConfig config);
-
-    public UserWithRole authenticate(String username, String password,
+    String KEY_USERNAME =
+           CredentialGraphTokens.PROPERTY_USERNAME;
+    String KEY_PASSWORD =
+           CredentialGraphTokens.PROPERTY_PASSWORD;
+    String KEY_TOKEN = "token";
+    String KEY_ROLE = "role";
+    String KEY_ADDRESS = "address";
+    String KEY_PATH = "path";
+
+    String USER_SYSTEM = "system";
+    String USER_ADMIN = "admin";
+    String USER_ANONY = AuthenticatedUser.ANONYMOUS_USERNAME;
+
+    RolePermission ROLE_NONE = RolePermission.none();
+    RolePermission ROLE_ADMIN = RolePermission.admin();
+
+    String VAR_PREFIX = "$";
+    String KEY_OWNER = VAR_PREFIX + "owner";
+    String KEY_DYNAMIC = VAR_PREFIX + "dynamic";
+    String KEY_ACTION = VAR_PREFIX + "action";
+
+    void setup(HugeConfig config);
+
+    UserWithRole authenticate(String username, String password,

Review Comment:
   also update alignment of line 70



##########
hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/Serializer.java:
##########
@@ -42,65 +42,65 @@
 
 public interface Serializer {
 
-    public String writeMap(Map<?, ?> map);
+    String writeMap(Map<?, ?> map);
 
-    public String writeList(String label, Collection<?> list);
+    String writeList(String label, Collection<?> list);
 
-    public String writePropertyKey(PropertyKey propertyKey);
+    String writePropertyKey(PropertyKey propertyKey);
 
-    public String writePropertyKeys(List<PropertyKey> propertyKeys);
+    String writePropertyKeys(List<PropertyKey> propertyKeys);
 
-    public String writeVertexLabel(VertexLabel vertexLabel);
+    String writeVertexLabel(VertexLabel vertexLabel);
 
-    public String writeVertexLabels(List<VertexLabel> vertexLabels);
+    String writeVertexLabels(List<VertexLabel> vertexLabels);
 
-    public String writeEdgeLabel(EdgeLabel edgeLabel);
+    String writeEdgeLabel(EdgeLabel edgeLabel);
 
-    public String writeEdgeLabels(List<EdgeLabel> edgeLabels);
+    String writeEdgeLabels(List<EdgeLabel> edgeLabels);
 
-    public String writeIndexlabel(IndexLabel indexLabel);
+    String writeIndexlabel(IndexLabel indexLabel);
 
-    public String writeIndexlabels(List<IndexLabel> indexLabels);
+    String writeIndexlabels(List<IndexLabel> indexLabels);
 
-    public String writeTaskWithSchema(SchemaElement.TaskWithSchema tws);
+    String writeTaskWithSchema(SchemaElement.TaskWithSchema tws);
 
-    public String writeVertex(Vertex v);
+    String writeVertex(Vertex v);
 
-    public String writeVertices(Iterator<Vertex> vertices, boolean paging);
+    String writeVertices(Iterator<Vertex> vertices, boolean paging);
 
-    public String writeEdge(Edge e);
+    String writeEdge(Edge e);
 
-    public String writeEdges(Iterator<Edge> edges, boolean paging);
+    String writeEdges(Iterator<Edge> edges, boolean paging);
 
-    public String writeIds(List<Id> ids);
+    String writeIds(List<Id> ids);
 
-    public String writeAuthElement(AuthElement elem);
+    String writeAuthElement(AuthElement elem);
 
-    public <V extends AuthElement> String writeAuthElements(String label,
+    <V extends AuthElement> String writeAuthElements(String label,

Review Comment:
   also update alignment



##########
hugegraph-core/src/main/java/com/baidu/hugegraph/rpc/RpcServiceConfig4Server.java:
##########
@@ -21,12 +21,12 @@
 
 public interface RpcServiceConfig4Server {
 
-    public <T, S extends T> String addService(Class<T> clazz, S serviceImpl);
+    <T, S extends T> String addService(Class<T> clazz, S serviceImpl);
 
-    public <T, S extends T> String addService(String graph,
+    <T, S extends T> String addService(String graph,

Review Comment:
   ditto



##########
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Aggregate.java:
##########
@@ -72,7 +72,7 @@ public static enum AggregateFunc {
         private final Number defaultValue;
         private final BiFunction<Number, Number, Number> merger;
 
-        private AggregateFunc(String name, Number defaultValue,
+        AggregateFunc(String name, Number defaultValue,

Review Comment:
   ditto



##########
hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java:
##########
@@ -43,36 +43,36 @@
 
 public interface HugeAuthenticator extends Authenticator {
 
-    public static final String KEY_USERNAME =
-                               CredentialGraphTokens.PROPERTY_USERNAME;
-    public static final String KEY_PASSWORD =
-                               CredentialGraphTokens.PROPERTY_PASSWORD;
-    public static final String KEY_TOKEN = "token";
-    public static final String KEY_ROLE = "role";
-    public static final String KEY_ADDRESS = "address";
-    public static final String KEY_PATH = "path";
-
-    public static final String USER_SYSTEM = "system";
-    public static final String USER_ADMIN = "admin";
-    public static final String USER_ANONY = AuthenticatedUser.ANONYMOUS_USERNAME;
-
-    public static final RolePermission ROLE_NONE = RolePermission.none();
-    public static final RolePermission ROLE_ADMIN = RolePermission.admin();
-
-    public static final String VAR_PREFIX = "$";
-    public static final String KEY_OWNER = VAR_PREFIX + "owner";
-    public static final String KEY_DYNAMIC = VAR_PREFIX + "dynamic";
-    public static final String KEY_ACTION = VAR_PREFIX + "action";
-
-    public void setup(HugeConfig config);
-
-    public UserWithRole authenticate(String username, String password,
+    String KEY_USERNAME =
+           CredentialGraphTokens.PROPERTY_USERNAME;
+    String KEY_PASSWORD =
+           CredentialGraphTokens.PROPERTY_PASSWORD;

Review Comment:
   ditto



##########
hugegraph-core/src/main/java/com/baidu/hugegraph/util/RateLimiter.java:
##########
@@ -24,15 +24,15 @@
 // TODO: Move to common module (concurrent package)
 public interface RateLimiter {
 
-    public final Logger LOG = Log.logger(RateLimiter.class);
+    Logger LOG = Log.logger(RateLimiter.class);

Review Comment:
   remove the LOG field from an interface



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org