Skip to content

Commit

Permalink
optimize: fix some typos in project (apache#6911)
Browse files Browse the repository at this point in the history
  • Loading branch information
psxjoy authored Oct 12, 2024
1 parent 87c1696 commit 66bd3a4
Show file tree
Hide file tree
Showing 22 changed files with 28 additions and 26 deletions.
3 changes: 2 additions & 1 deletion changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6902](https://github.com/apache/incubator-seata/pull/6900)] optimize readme docs
- [[#6905](https://github.com/apache/incubator-seata/pull/6905)] remove incompatible licenses at build time
- [[#6906](https://github.com/apache/incubator-seata/pull/6906)] h2 dependency adds test scope

- [[#6911](https://github.com/apache/incubator-seata/pull/6911)] fix some typos in project


### refactor:
Expand All @@ -48,6 +48,7 @@ Thanks to these contributors for their code commits. Please report an unintended
- [xjlgod](https://github.com/xjlgod)
- [PleaseGiveMeTheCoke](https://github.com/PleaseGiveMeTheCoke)
- [dsomehan](https://github.com/dsomehan)
- [psxjoy](https://github.com/psxjoy)



Expand Down
3 changes: 2 additions & 1 deletion changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- [[#6902](https://github.com/apache/incubator-seata/pull/6900)] 优化 readme 文档
- [[#6905](https://github.com/apache/incubator-seata/pull/6905)] 移除构建期不兼容的 license
- [[#6906](https://github.com/apache/incubator-seata/pull/6906)] h2依赖添加test scope
- [[#6911](https://github.com/apache/incubator-seata/pull/6911)] 修正项目中的部分拼写错误


### refactor:
Expand All @@ -50,7 +51,7 @@
- [xjlgod](https://github.com/xjlgod)
- [PleaseGiveMeTheCoke](https://github.com/PleaseGiveMeTheCoke)
- [dsomehan](https://github.com/dsomehan)

- [psxjoy](https://github.com/psxjoy)

同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。

Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public interface GlobalTransaction extends BaseTransaction {
/**
* Suspend the global transaction.
*
* @param clean the clean if true, clean the transaction context. otherwise,supend only
* @param clean the clean if true, clean the transaction context. otherwise,suspend only
* @return the SuspendedResourcesHolder which holds the suspend resources
* @throws TransactionException Any exception that fails this will be wrapped with TransactionException and thrown
* @see SuspendedResourcesHolder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public final class ConfigurationFactory {
public static volatile FileConfiguration ORIGIN_FILE_INSTANCE = null;

static {
initOriginConfiguraction();
initOriginConfiguration();
load();
maybeNeedOriginFileInstance();
}
Expand All @@ -83,7 +83,7 @@ private static void load() {
CURRENT_FILE_INSTANCE = extConfiguration == null ? configuration : extConfiguration;
}

private static void initOriginConfiguraction() {
private static void initOriginConfiguration() {
String seataConfigName = System.getProperty(SYSTEM_PROPERTY_SEATA_CONFIG_NAME);
if (seataConfigName == null) {
seataConfigName = System.getenv(ENV_SEATA_CONFIG_NAME);
Expand Down Expand Up @@ -225,7 +225,7 @@ private static Configuration getNonSpringConfiguration(String configTypeName) {

public static void reload() {
ConfigurationCache.clear();
initOriginConfiguraction();
initOriginConfiguration();
load();
maybeNeedOriginFileInstance();
instance = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.springframework.security.core.userdetails.UserDetails;

/**
* custem user
* custom user
*
*/
public class CustomUserDetails implements UserDetails {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.springframework.stereotype.Service;

/**
* Custem user service
* Custom user service
*
*/
@Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public enum TransactionExceptionCode {
/**
* Failed to lock global transaction exception code.
*/
FailedLockGlobalTranscation,
FailedLockGlobalTransaction,

/**
* FailedWriteSession
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public enum Protocol {
/**
* grpc
*/
GPRC("grpc"),
GRPC("grpc"),

/**
* seata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void start() {
@Override
public void initChannel(SocketChannel ch) {
ChannelPipeline pipeline = ch.pipeline();
if (nettyClientConfig.getProtocol().equals(Protocol.GPRC.value)) {
if (nettyClientConfig.getProtocol().equals(Protocol.GRPC.value)) {
pipeline.addLast(Http2FrameCodecBuilder.forClient().build())
.addLast(new Http2MultiplexHandler(new ChannelDuplexHandler()));
} else {
Expand Down Expand Up @@ -191,7 +191,7 @@ public Channel getNewChannel(InetSocketAddress address) {
channel = f.channel();
}

if (nettyClientConfig.getProtocol().equals(Protocol.GPRC.value)) {
if (nettyClientConfig.getProtocol().equals(Protocol.GRPC.value)) {
Http2StreamChannelBootstrap bootstrap = new Http2StreamChannelBootstrap(channel);
bootstrap.handler(new ChannelInboundHandlerAdapter() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.apache.seata.sqlparser.util.JdbcConstants;

/**
* The type oralce undo insert executor.
* The type oracle undo insert executor.
*
*/
public class OracleUndoInsertExecutor extends AbstractUndoExecutor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public void testBeforeAndAfterImageColumnWithQuote() throws SQLException {

@Test
public void testBeforeAndAfterImageUpperColumn() throws SQLException {
String sql = "insert into table_insert_executor_test(ID, USER_ID, NMAE, SEX) values (1, 1, 'will', 1)";
String sql = "insert into table_insert_executor_test(ID, USER_ID, NAME, SEX) values (1, 1, 'will', 1)";
List<SQLStatement> asts = SQLUtils.parseStatements(sql, JdbcConstants.MYSQL);
MySQLInsertRecognizer recognizer = new MySQLInsertRecognizer(sql, asts.get(0));
newInsertExecutor = new MySQLInsertExecutor(newStatementProxy, (statement, args) -> null, recognizer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.apache.seata.saga.proctrl.eventing.EventPublisher;

/**
* ProcessCtrl Event Pulisher
* ProcessCtrl Event Publisher
*
*/
public class ProcessCtrlEventPublisher implements EventPublisher<ProcessContext> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.apache.seata.saga.statelang.parser.StateParser;

/**
* ServcieTaskTask parser
* ServiceTaskTask parser
*
*/
public class ServiceTaskStateParser extends AbstractTaskStateParser implements StateParser<ServiceTaskState> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ public void lock() throws TransactionException {
} catch (InterruptedException e) {
LOGGER.error("Interrupted error", e);
}
throw new GlobalTransactionException(TransactionExceptionCode.FailedLockGlobalTranscation, "Lock global session failed");
throw new GlobalTransactionException(TransactionExceptionCode.FailedLockGlobalTransaction, "Lock global session failed");
}

public void unlock() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ public static void convertToGlobalSessionVo(List<GlobalSessionVO> result, List<G
BeanUtils.copyProperties(globalSession,globalSessionVO);
globalSessionVO.setStatus(globalSession.getStatus().getCode());
globalSessionVO.setTimeout(Long.valueOf(globalSession.getTimeout()));
globalSessionVO.setBranchSessionVOs(converToBranchSession(globalSession.getBranchSessions()));
globalSessionVO.setBranchSessionVOs(convertToBranchSession(globalSession.getBranchSessions()));
result.add(globalSessionVO);
}
}
}

public static Set<BranchSessionVO> converToBranchSession(List<BranchSession> branchSessions) {
public static Set<BranchSessionVO> convertToBranchSession(List<BranchSession> branchSessions) {
Set<BranchSessionVO> branchSessionVOs = new HashSet<>(branchSessions.size());
if (CollectionUtils.isNotEmpty(branchSessions)) {
for (BranchSession branchSession : branchSessions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void testSetGetColumnSize() {
}

@Test
public void testSetGetDemicalDigits() {
public void testSetGetDecimalDigits() {
ColumnMeta columnMeta = new ColumnMeta();
columnMeta.setDecimalDigits(2);
assertEquals(2, columnMeta.getDecimalDigits());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public void setRemotingServer(RemotingServer remotingServer) {
}


public void setExepectedResult(String xid, ResultCode expected) {
public void setExpectedResult(String xid, ResultCode expected) {
expectedResultMap.put(xid, expected);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public String health() {

@PostMapping("/expect/result")
public String expectResult(@RequestParam String xid, @RequestParam int code) {
MockCoordinator.getInstance().setExepectedResult(xid, ResultCode.get(code));
MockCoordinator.getInstance().setExpectedResult(xid, ResultCode.get(code));
return OK;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void testSendMsgWithResponse() throws Exception {
BranchRegisterRequest request = new BranchRegisterRequest();
request.setXid("127.0.0.1:8091:1249853");
request.setLockKey("lock key testSendMsgWithResponse");
request.setResourceId("resoutceId1");
request.setResourceId("resourceId1");
BranchRegisterResponse branchRegisterResponse = (BranchRegisterResponse) tmNettyRemotingClient.sendSyncRequest(request);
Assertions.assertNotNull(branchRegisterResponse);
Assertions.assertEquals(ResultCode.Failed, branchRegisterResponse.getResultCode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class MockGrpcServerTest {
public static void before() {
ConfigurationFactory.reload();
ConfigurationTestHelper.putConfig(ConfigurationKeys.SERVER_SERVICE_PORT_CAMEL, String.valueOf(ProtocolTestConstants.MOCK_SERVER_PORT));
ConfigurationTestHelper.putConfig(ConfigurationKeys.TRANSPORT_PROTOCOL, Protocol.GPRC.value);
ConfigurationTestHelper.putConfig(ConfigurationKeys.TRANSPORT_PROTOCOL, Protocol.GRPC.value);
MockServer.start(ProtocolTestConstants.MOCK_SERVER_PORT);
TmNettyRemotingClient.getInstance().destroy();
RmNettyRemotingClient.getInstance().destroy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static void testTm() throws Exception {
LOGGER.info("globalReport ok:" + globalReport);
Assertions.assertEquals(globalReport, GlobalStatus.Committed);

MockCoordinator.getInstance().setExepectedResult(xid, ResultCode.Failed);
MockCoordinator.getInstance().setExpectedResult(xid, ResultCode.Failed);
// GlobalStatus globalReport2 = tm.globalReport(xid, GlobalStatus.Committed);

GlobalStatus rollback2 = tm.rollback(xid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public interface GlobalTransaction extends BaseTransaction {
/**
* Suspend the global transaction.
*
* @param clean the clean if true, clean the transaction context. otherwise,supend only
* @param clean the clean if true, clean the transaction context. otherwise,suspend only
* @return the SuspendedResourcesHolder which holds the suspend resources
* @throws TransactionException Any exception that fails this will be wrapped with TransactionException and thrown
* @see SuspendedResourcesHolder
Expand Down

0 comments on commit 66bd3a4

Please sign in to comment.