This is an automated email from the ASF dual-hosted git repository.
panjuan 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 ef422aef870 Remove unused getter and add final modifier (#19072)
ef422aef870 is described below
commit ef422aef87058b309d1e6398f30251c35426557f
Author: 吴伟杰 <[email protected]>
AuthorDate: Wed Jul 13 10:47:06 2022 +0800
Remove unused getter and add final modifier (#19072)
* Remove unused getter in codes
* Add final modifier
---
.../org/apache/shardingsphere/infra/check/SQLCheckException.java | 2 --
.../apache/shardingsphere/infra/exception/NoDatabaseException.java | 3 ---
.../infra/metadata/database/schema/event/DropIndexEvent.java | 2 +-
.../infra/metadata/database/schema/event/SchemaAlteredEvent.java | 7 ++-----
.../apache/shardingsphere/driver/executor/DriverJDBCExecutor.java | 2 --
.../state/circuit/statement/CircuitBreakerPreparedStatement.java | 2 --
.../driver/state/circuit/statement/CircuitBreakerStatement.java | 4 +---
.../org/apache/shardingsphere/authority/model/PrivilegeType.java | 5 -----
.../backend/communication/jdbc/executor/ProxyJDBCExecutor.java | 2 --
9 files changed, 4 insertions(+), 25 deletions(-)
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/check/SQLCheckException.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/check/SQLCheckException.java
index 9be6048d27b..e120f24c815 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/check/SQLCheckException.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/check/SQLCheckException.java
@@ -17,13 +17,11 @@
package org.apache.shardingsphere.infra.check;
-import lombok.Getter;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
/**
* SQL check exception.
*/
-@Getter
public final class SQLCheckException extends ShardingSphereException {
private static final long serialVersionUID = 4183020614721058122L;
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/NoDatabaseException.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/NoDatabaseException.java
index 178fb144ce2..c1f3a334e84 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/NoDatabaseException.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/exception/NoDatabaseException.java
@@ -17,12 +17,9 @@
package org.apache.shardingsphere.infra.exception;
-import lombok.Getter;
-
/**
* No Database exception.
*/
-@Getter
public final class NoDatabaseException extends ShardingSphereException {
private static final long serialVersionUID = -835255743584004153L;
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/event/DropIndexEvent.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/event/DropIndexEvent.java
index c061ce81572..5757b718ec8 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/event/DropIndexEvent.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/event/DropIndexEvent.java
@@ -28,5 +28,5 @@ import java.util.List;
@Getter
public final class DropIndexEvent implements MetaDataRefreshedEvent {
- private List<SchemaAlteredEvent> schemaAlteredEvents = new LinkedList<>();
+ private final List<SchemaAlteredEvent> schemaAlteredEvents = new
LinkedList<>();
}
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/event/SchemaAlteredEvent.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/event/SchemaAlteredEvent.java
index 24bc40140b3..5c6fee35f6c 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/event/SchemaAlteredEvent.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/event/SchemaAlteredEvent.java
@@ -18,6 +18,7 @@
package org.apache.shardingsphere.infra.metadata.database.schema.event;
import lombok.Getter;
+import lombok.RequiredArgsConstructor;
import
org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereTable;
import java.util.ArrayList;
@@ -26,6 +27,7 @@ import java.util.Collection;
/**
* Schema altered event.
*/
+@RequiredArgsConstructor
@Getter
public final class SchemaAlteredEvent implements MetaDataRefreshedEvent {
@@ -36,9 +38,4 @@ public final class SchemaAlteredEvent implements
MetaDataRefreshedEvent {
private final Collection<ShardingSphereTable> alteredTables = new
ArrayList<>();
private final Collection<String> droppedTables = new ArrayList<>();
-
- public SchemaAlteredEvent(final String databaseName, final String
schemaName) {
- this.databaseName = databaseName;
- this.schemaName = schemaName;
- }
}
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/DriverJDBCExecutor.java
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/DriverJDBCExecutor.java
index c2a220f069a..f50c019b31f 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/DriverJDBCExecutor.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/DriverJDBCExecutor.java
@@ -17,7 +17,6 @@
package org.apache.shardingsphere.driver.executor;
-import lombok.Getter;
import org.apache.shardingsphere.driver.executor.callback.ExecuteQueryCallback;
import org.apache.shardingsphere.infra.binder.LogicSQL;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
@@ -52,7 +51,6 @@ public final class DriverJDBCExecutor {
private final ContextManager contextManager;
- @Getter
private final JDBCExecutor jdbcExecutor;
private final MetaDataRefreshEngine metadataRefreshEngine;
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerPreparedStatement.java
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerPreparedStatement.java
index 0948738c665..ac096d5e97a 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerPreparedStatement.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerPreparedStatement.java
@@ -17,7 +17,6 @@
package org.apache.shardingsphere.driver.state.circuit.statement;
-import lombok.Getter;
import org.apache.shardingsphere.driver.executor.DriverExecutor;
import org.apache.shardingsphere.driver.jdbc.core.statement.StatementManager;
import
org.apache.shardingsphere.driver.jdbc.unsupported.AbstractUnsupportedOperationPreparedStatement;
@@ -46,7 +45,6 @@ import java.util.Collections;
/**
* Circuit breaker preparedStatement.
*/
-@Getter
public final class CircuitBreakerPreparedStatement extends
AbstractUnsupportedOperationPreparedStatement {
@Override
diff --git
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerStatement.java
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerStatement.java
index c501a4dc834..3c4909d7f74 100644
---
a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerStatement.java
+++
b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/state/circuit/statement/CircuitBreakerStatement.java
@@ -17,9 +17,8 @@
package org.apache.shardingsphere.driver.state.circuit.statement;
-import lombok.Getter;
-import
org.apache.shardingsphere.driver.state.circuit.connection.CircuitBreakerConnection;
import
org.apache.shardingsphere.driver.jdbc.unsupported.AbstractUnsupportedOperationStatement;
+import
org.apache.shardingsphere.driver.state.circuit.connection.CircuitBreakerConnection;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -28,7 +27,6 @@ import java.sql.SQLWarning;
/**
* Circuit breaker statement.
*/
-@Getter
public final class CircuitBreakerStatement extends
AbstractUnsupportedOperationStatement {
@Override
diff --git
a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/model/PrivilegeType.java
b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/model/PrivilegeType.java
index 166c3ceff97..84c193de66e 100644
---
a/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/model/PrivilegeType.java
+++
b/shardingsphere-kernel/shardingsphere-authority/shardingsphere-authority-api/src/main/java/org/apache/shardingsphere/authority/model/PrivilegeType.java
@@ -17,14 +17,9 @@
package org.apache.shardingsphere.authority.model;
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-
/**
* Privilege Type.
*/
-@RequiredArgsConstructor
-@Getter
public enum PrivilegeType {
SELECT,
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/executor/ProxyJDBCExecutor.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/executor/ProxyJDBCExecutor.java
index c5557196742..c22b992acb2 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/executor/ProxyJDBCExecutor.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/executor/ProxyJDBCExecutor.java
@@ -17,7 +17,6 @@
package org.apache.shardingsphere.proxy.backend.communication.jdbc.executor;
-import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.infra.binder.LogicSQL;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
@@ -49,7 +48,6 @@ public final class ProxyJDBCExecutor {
private final JDBCDatabaseCommunicationEngine databaseCommunicationEngine;
- @Getter
private final JDBCExecutor jdbcExecutor;
/**