Skip to content
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

Remove redundant blank chars and lines in codes #17799

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class StateContext {
* Switch state.
*
* @param type state type
* @param on true if state type is valid, false if not
* @param on true if state type is valid, false if not
*/
public void switchState(final StateType type, final boolean on) {
if (on) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface MetaDataRefresher<T extends SQLStatement> extends TypedSPI {
* Refresh schema.
*
* @param databaseMetaData database meta data
* @param database federation database meta data
* @param database federation database meta data
* @param optimizerPlanners optimizer planners
* @param logicDataSourceNames route data source names
* @param schemaName schema name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public final class FederationExecutorFactory {
*
* @param databaseName database name
* @param schemaName schema name
* @param optimizerContext filterable optimizer context
* @param optimizerContext filterable optimizer context
* @param props configuration properties
* @param jdbcExecutor jdbc executor
* @return created instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ private String decorateIndexAndConstraint(final ShardingSphereDatabaseMetaData d
if (sqlStatementContext instanceof ConstraintAvailable) {
result = decorateConstraint((ConstraintAvailable) sqlStatementContext, result, tableNameSegment);
}

}
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ private PipelineColumnMetaData mustGetAnAppropriateUniqueKeyColumn(final Pipelin
if (!column.isNullable()) {
return column;
}

}
throw new PipelineJobCreationException(
String.format("Can not split range for table %s, reason: table contains multiple unique index or unique index contains nullable/multiple column(s)", tableName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ private AbstractRowEvent readTableEvent(final ByteBuffer data) {
private AbstractRowEvent readWriteRowEvent(final ByteBuffer data) {
WriteRowEvent result = new WriteRowEvent();
List<Object> afterColumns = new LinkedList<>();

while (data.hasRemaining()) {
afterColumns.add(readColumn(data));
}
Expand All @@ -96,7 +95,6 @@ private AbstractRowEvent readWriteRowEvent(final ByteBuffer data) {
private AbstractRowEvent readUpdateRowEvent(final ByteBuffer data) {
UpdateRowEvent result = new UpdateRowEvent();
List<Object> afterColumns = new LinkedList<>();

while (data.hasRemaining()) {
afterColumns.add(readColumn(data));
}
Expand All @@ -107,7 +105,6 @@ private AbstractRowEvent readUpdateRowEvent(final ByteBuffer data) {
private AbstractRowEvent readDeleteRowEvent(final ByteBuffer data) {
DeleteRowEvent result = new DeleteRowEvent();
List<Object> afterColumns = new LinkedList<>();

while (data.hasRemaining()) {
afterColumns.add(readColumn(data));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface SingleTableRouteEngine {
/**
* Route.
*
* @param routeContext route context
* @param routeContext route context
* @param singleTableRule single table rule
*/
void route(RouteContext routeContext, SingleTableRule singleTableRule);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class DatabaseMetaDataNode {
* Get meta data data source path.
*
* @param databaseName database name
* @param version data source version
* @param version data source version
* @return data source path
*/
public static String getMetaDataDataSourcePath(final String databaseName, final String version) {
Expand Down Expand Up @@ -78,7 +78,7 @@ public static String getDatabaseNamePath(final String databaseName) {
* Get rule path.
*
* @param databaseName database name
* @param version rule version
* @param version rule version
* @return rule path
*/
public static String getRulePath(final String databaseName, final String version) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public final class ComputeNodePersistService {
*
* @param instanceId instance id
* @param labels collection of label
* @param isOverwrite whether overwrite registry center's configuration if existed
* @param isOverwrite whether overwrite registry center's configuration if existed
*/
public void persistInstanceLabels(final String instanceId, final Collection<String> labels, final boolean isOverwrite) {
if (null != labels && !labels.isEmpty() && (isOverwrite || !isExisted(instanceId))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class QueryHeaderBuilderEngine {
*
* @param queryResultMetaData query result meta data
* @param databaseMetaData database meta data
* @param columnIndex column index
* @param columnIndex column index
* @param dataNodeContainedRule data node contained rule
* @return query header
* @throws SQLException SQL exception
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@ public ASTNode visitInsertColumnItem(final InsertColumnItemContext ctx) {
new IdentifierValue(ctx.optIndirection().indirectionEl().attrName().getText()));
result.setOwner(new OwnerSegment(ctx.colId().start.getStartIndex(), ctx.colId().stop.getStopIndex(), new IdentifierValue(ctx.colId().getText())));
return result;

} else {
return new ColumnSegment(ctx.colId().start.getStartIndex(), ctx.colId().stop.getStopIndex(), new IdentifierValue(ctx.colId().getText()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ public ASTNode visitInsertColumnItem(final InsertColumnItemContext ctx) {
new IdentifierValue(ctx.optIndirection().indirectionEl().attrName().getText()));
result.setOwner(new OwnerSegment(ctx.colId().start.getStartIndex(), ctx.colId().stop.getStopIndex(), new IdentifierValue(ctx.colId().getText())));
return result;

} else {
return new ColumnSegment(ctx.colId().start.getStartIndex(), ctx.colId().stop.getStopIndex(), new IdentifierValue(ctx.colId().getText()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public static void assertIs(final SQLCaseAssertContext assertContext, final Colu
if (actual instanceof ColumnAfterPositionSegment) {
assertNotNull(assertContext.getText("Assignments should exist."), expected.getColumn());
assertThat(assertContext.getText("Column change position after name assertion error: "), actual.getColumnName().getIdentifier().getValue(), is(expected.getColumn().getName()));

} else {
assertNull(assertContext.getText("Assignments should not exist."), expected.getColumn());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public static void assertIs(final SQLCaseAssertContext assertContext, final Alte
} else {
assertNotNull(assertContext.getText("Actual statement should exist."), actual);
assertDatabaseDiscoveryRules(assertContext, actual.getRules(), expected);

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private Map<String, Case> loadFromTargetDirectory(final String path) throws JAXB
/**
* build case map.
* @param caseMap result map
* @param inputStream xml inputStream
* @param inputStream xml inputStream
* @throws JAXBException JAXBException
*/
protected abstract void buildCaseMap(Map<String, Case> caseMap, InputStream inputStream) throws JAXBException;
Expand Down