-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix redundant Checkstyle #1896
fix redundant Checkstyle #1896
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1896 +/- ##
============================================
+ Coverage 70.54% 70.58% +0.04%
+ Complexity 978 724 -254
============================================
Files 454 454
Lines 39055 39054 -1
Branches 5557 5557
============================================
+ Hits 27550 27567 +17
+ Misses 8806 8791 -15
+ Partials 2699 2696 -3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/Serializer.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Aggregate.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/rpc/RpcServiceConfig4Server.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/util/RateLimiter.java
Outdated
Show resolved
Hide resolved
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/auth/HugeAuthenticator.java
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/serializer/Serializer.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Aggregate.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/rpc/RpcServiceConfig4Server.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/traversal/algorithm/records/Records.java
Outdated
Show resolved
Hide resolved
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java
Outdated
Show resolved
Hide resolved
hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBStore.java
Show resolved
Hide resolved
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java
Outdated
Show resolved
Hide resolved
@@ -81,7 +81,8 @@ default void setup(final Map<String, Object> config) { | |||
|
|||
@Override | |||
default User authenticate(final Map<String, String> credentials) | |||
throws AuthenticationException { | |||
throws AuthenticationException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
align with final
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so we could algin with "final"
if we break line from "credentials",we can align with "final",because "final Map<String, String> credentials" are the entire content in parenthesis
but "throws" is out of parenthesis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -34,8 +34,8 @@ public interface Records { | |||
|
|||
Id nextKey(); | |||
|
|||
PathSet findPath(Id target, Function<Id, Boolean> filter, | |||
boolean all, boolean ring); | |||
PathSet findPath(Id target, Function<Id, Boolean> filter, boolean all, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer to wrap line before "boolean all"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line only 75 char. so i think wrap line after "boolean all" is better.
@@ -415,8 +416,8 @@ default R scan(String table, Set<byte[]> prefixes) { | |||
/** | |||
* Scan records by rowkey start and prefix from a table | |||
*/ | |||
default R scan(String table, byte[] startRow, | |||
boolean inclusiveStart, byte[] prefix) { | |||
default R scan(String table, byte[] startRow, boolean inclusiveStart, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer to wrap line before "boolean inclusiveStart"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line only 78 char.
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java
Show resolved
Hide resolved
|
||
/** | ||
* Add a row record to a table(can be used when adding an index) | ||
*/ | ||
public abstract void put(String table, byte[] family, | ||
byte[] rowkey, byte[] qualifier, byte[] value); | ||
void put(String table, byte[] family, byte[] rowkey, byte[] qualifier, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer to wrap line before "byte[] qualifier"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is only 79 char
|
||
/** | ||
* Get a record by rowkey and qualifier from a table | ||
*/ | ||
public R get(String table, byte[] family, byte[] rowkey, | ||
R get(String table, byte[] family, byte[] rowkey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing updating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
|
||
/** | ||
* Delete a record by rowkey and qualifier from a table | ||
*/ | ||
public default void remove(String table, byte[] family, | ||
byte[] rowkey, byte[] qualifier) { | ||
default void remove(String table, byte[] family, byte[] rowkey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer to wrap line before "byte[] rowkey"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line only 72 char
…/incubator-hugegraph into checkstyle-redundant
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java
Outdated
Show resolved
Hide resolved
hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java
Outdated
Show resolved
Hide resolved
@@ -484,7 +483,7 @@ private int batchSize() { | |||
} | |||
|
|||
private void checkBatchResults(Object[] results, List<Row> rows) | |||
throws Throwable { | |||
throws Throwable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
/** | ||
* Session implement for HBase | ||
*/ | ||
public class Session extends AbstractBackendSession | ||
implements HbaseSession<RowIterator> { | ||
implements HbaseSession<RowIterator> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep the origin style: align 'implements' with 'extends'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public default User authenticate(final Map<String, String> credentials) | ||
throws AuthenticationException { | ||
default User authenticate(final Map<String, String> credentials) | ||
throws AuthenticationException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep the origin style: align 'throws' with 'final'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -554,7 +552,7 @@ public Integer commit() { | |||
} catch (Throwable e) { | |||
// TODO: Mark and delete committed records | |||
throw new BackendException("Failed to commit, " + | |||
"there may be inconsistent states for HBase", e); | |||
"there may be inconsistent states for HBase", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exceed 100 chars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fixed by #1996
@@ -809,7 +807,7 @@ private void dump(String table, Scan scan) throws IOException { | |||
byte[] key = CellUtil.cloneQualifier(cell); | |||
byte[] val = CellUtil.cloneValue(cell); | |||
LOG.info(" {}={}", StringEncoding.format(key), | |||
StringEncoding.format(val)); | |||
StringEncoding.format(val)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also wrap line before StringEncoding.format(key)
for logic symmetry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -198,7 +202,6 @@ | |||
</module> | |||
<module name="OneStatementPerLine"/> | |||
<module name="MultipleVariableDeclarations"/> | |||
<module name="MissingSwitchDefault"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why removed MissingSwitchDefault check
@@ -485,7 +483,7 @@ private int batchSize() { | |||
} | |||
|
|||
private void checkBatchResults(Object[] results, List<Row> rows) | |||
throws Throwable { | |||
throws Throwable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep the origin style: align 'throws' with 'Object[]'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also address some other comments: https://github.com/apache/incubator-hugegraph/pull/1896/files |
Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. there are still some tiny comments to be addressed: https://github.com/apache/incubator-hugegraph/pull/1896/files
will fixed by #1996 |
add redundant word check