You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2023/05/22 02:53:49 UTC
[shardingsphere] branch master updated: small fixes added for sonar (#25717)
This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new bc325021ba0 small fixes added for sonar (#25717)
bc325021ba0 is described below
commit bc325021ba01377f643850fcfb7973f117b1fe53
Author: Salman <sa...@gmail.com>
AuthorDate: Mon May 22 04:53:41 2023 +0200
small fixes added for sonar (#25717)
* small fixes added for sonar
* fix reverted and a small issue fixed
---
.../AbstractStreamingDataConsistencyCalculateAlgorithm.java | 4 ++--
.../algorithm/DataMatchDataConsistencyCalculateAlgorithm.java | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/AbstractStreamingDataConsistencyCalculateAlgorithm.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/AbstractStreamingDataConsistencyCalculateAlgorithm.java
index e0a93d76d3f..351810a6560 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/AbstractStreamingDataConsistencyCalculateAlgorithm.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/AbstractStreamingDataConsistencyCalculateAlgorithm.java
@@ -78,9 +78,9 @@ public abstract class AbstractStreamingDataConsistencyCalculateAlgorithm extends
@Override
public DataConsistencyCalculatedResult next() {
calculateIfNecessary();
- Optional<DataConsistencyCalculatedResult> nextResult = this.nextResult.get();
+ Optional<DataConsistencyCalculatedResult> nextCalculatedResult = this.nextResult.get();
this.nextResult.set(null);
- return nextResult.orElseThrow(NoSuchElementException::new);
+ return nextCalculatedResult.orElseThrow(NoSuchElementException::new);
}
private void calculateIfNecessary() {
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
index 01b30ae060f..75f71ddff57 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
@@ -106,11 +106,11 @@ public final class DataMatchDataConsistencyCalculateAlgorithm extends AbstractSt
ShardingSpherePreconditions.checkState(!isCanceling(), () -> new PipelineTableDataConsistencyCheckLoadingFailedException(param.getSchemaName(), param.getLogicTableName()));
ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
int columnCount = resultSetMetaData.getColumnCount();
- Collection<Object> record = new LinkedList<>();
+ Collection<Object> columnRecord = new LinkedList<>();
for (int columnIndex = 1; columnIndex <= columnCount; columnIndex++) {
- record.add(columnValueReader.readValue(resultSet, resultSetMetaData, columnIndex));
+ columnRecord.add(columnValueReader.readValue(resultSet, resultSetMetaData, columnIndex));
}
- records.add(record);
+ records.add(columnRecord);
maxUniqueKeyValue = columnValueReader.readValue(resultSet, resultSetMetaData, param.getUniqueKey().getOrdinalPosition());
if (records.size() == chunkSize) {
break;