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 2020/10/12 06:44:19 UTC
[shardingsphere] branch master updated: Add final keyword (#7749)
This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 0800a37 Add final keyword (#7749)
0800a37 is described below
commit 0800a37e4681a0497272900e66e9d7e56825368e
Author: 邱鹿 Lucas <lu...@163.com>
AuthorDate: Mon Oct 12 14:44:05 2020 +0800
Add final keyword (#7749)
Co-authored-by: qiulu3 <Lucas209910>
---
.../scaling/core/check/AbstractDataConsistencyChecker.java | 4 ++--
.../shardingsphere/scaling/mysql/MySQLDataConsistencyChecker.java | 6 +++---
.../shardingsphere/scaling/postgresql/PostgreSQLWalDumperTest.java | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/check/AbstractDataConsistencyChecker.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/check/AbstractDataConsistencyChecker.java
index 3ae595f..219d1fd 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/check/AbstractDataConsistencyChecker.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/check/AbstractDataConsistencyChecker.java
@@ -59,7 +59,7 @@ public abstract class AbstractDataConsistencyChecker implements DataConsistencyC
long sourceCount = count(sourceDataSource, table);
long targetCount = count(targetDataSource, table);
return new DataConsistencyCheckResult(sourceCount, targetCount);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
throw new DataCheckFailException(String.format("table %s count check failed.", table), ex);
}
}
@@ -70,7 +70,7 @@ public abstract class AbstractDataConsistencyChecker implements DataConsistencyC
ResultSet resultSet = preparedStatement.executeQuery()) {
resultSet.next();
return resultSet.getLong(1);
- } catch (SQLException ex) {
+ } catch (final SQLException ex) {
throw new DataCheckFailException(String.format("table %s count failed.", table), ex);
}
}
diff --git a/shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/MySQLDataConsistencyChecker.java b/shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/MySQLDataConsistencyChecker.java
index 77dcf2f..07ad938 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/MySQLDataConsistencyChecker.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/MySQLDataConsistencyChecker.java
@@ -62,7 +62,7 @@ public final class MySQLDataConsistencyChecker extends AbstractDataConsistencyCh
try (DataSourceWrapper sourceDataSource = getSourceDataSource();
DataSourceWrapper targetDataSource = getTargetDataSource()) {
return getColumns(actualTableName).stream().allMatch(each -> sumCrc32(sourceDataSource, logicTableName, each) == sumCrc32(targetDataSource, logicTableName, each));
- } catch (IOException ex) {
+ } catch (final IOException ex) {
throw new DataCheckFailException(String.format("table %s data check failed.", logicTableName), ex);
}
}
@@ -75,7 +75,7 @@ public final class MySQLDataConsistencyChecker extends AbstractDataConsistencyCh
while (resultSet.next()) {
result.add(resultSet.getString(4));
}
- } catch (SQLException | IOException ex) {
+ } catch (final SQLException | IOException ex) {
throw new DataCheckFailException("get columns failed.", ex);
}
return result;
@@ -88,7 +88,7 @@ public final class MySQLDataConsistencyChecker extends AbstractDataConsistencyCh
ResultSet resultSet = preparedStatement.executeQuery()) {
resultSet.next();
return resultSet.getLong(1);
- } catch (SQLException ex) {
+ } catch (final SQLException ex) {
throw new DataCheckFailException(String.format("execute %s failed.", sql), ex);
}
}
diff --git a/shardingsphere-scaling/shardingsphere-scaling-postgresql/src/test/java/org/apache/shardingsphere/scaling/postgresql/PostgreSQLWalDumperTest.java b/shardingsphere-scaling/shardingsphere-scaling-postgresql/src/test/java/org/apache/shardingsphere/scaling/postgresql/PostgreSQLWalDumperTest.java
index 8a67967..b40dc31 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-postgresql/src/test/java/org/apache/shardingsphere/scaling/postgresql/PostgreSQLWalDumperTest.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-postgresql/src/test/java/org/apache/shardingsphere/scaling/postgresql/PostgreSQLWalDumperTest.java
@@ -91,7 +91,7 @@ public final class PostgreSQLWalDumperTest {
when(pgReplicationStream.readPending()).thenReturn(null).thenReturn(data).thenThrow(new SQLException(""));
when(pgReplicationStream.getLastReceiveLSN()).thenReturn(LogSequenceNumber.valueOf(101L));
postgreSQLWalDumper.start();
- } catch (final SyncTaskExecuteException ignore) {
+ } catch (final SyncTaskExecuteException ignored) {
}
assertThat(channel.fetchRecords(100, 0).size(), is(1));
}