Skip to content

Commit 66bd3a4

Browse files
authored
optimize: fix some typos in project (apache#6911)
1 parent 87c1696 commit 66bd3a4

File tree

22 files changed

+28
-26
lines changed

22 files changed

+28
-26
lines changed

changes/en-us/2.x.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Add changes here for all PR submitted to the 2.x branch.
2525
- [[#6902](https://github.com/apache/incubator-seata/pull/6900)] optimize readme docs
2626
- [[#6905](https://github.com/apache/incubator-seata/pull/6905)] remove incompatible licenses at build time
2727
- [[#6906](https://github.com/apache/incubator-seata/pull/6906)] h2 dependency adds test scope
28-
28+
- [[#6911](https://github.com/apache/incubator-seata/pull/6911)] fix some typos in project
2929

3030

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

5253

5354

changes/zh-cn/2.x.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- [[#6902](https://github.com/apache/incubator-seata/pull/6900)] 优化 readme 文档
2828
- [[#6905](https://github.com/apache/incubator-seata/pull/6905)] 移除构建期不兼容的 license
2929
- [[#6906](https://github.com/apache/incubator-seata/pull/6906)] h2依赖添加test scope
30+
- [[#6911](https://github.com/apache/incubator-seata/pull/6911)] 修正项目中的部分拼写错误
3031

3132

3233
### refactor:
@@ -50,7 +51,7 @@
5051
- [xjlgod](https://github.com/xjlgod)
5152
- [PleaseGiveMeTheCoke](https://github.com/PleaseGiveMeTheCoke)
5253
- [dsomehan](https://github.com/dsomehan)
53-
54+
- [psxjoy](https://github.com/psxjoy)
5455

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

compatible/src/main/java/io/seata/tm/api/GlobalTransaction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public interface GlobalTransaction extends BaseTransaction {
8282
/**
8383
* Suspend the global transaction.
8484
*
85-
* @param clean the clean if true, clean the transaction context. otherwise,supend only
85+
* @param clean the clean if true, clean the transaction context. otherwise,suspend only
8686
* @return the SuspendedResourcesHolder which holds the suspend resources
8787
* @throws TransactionException Any exception that fails this will be wrapped with TransactionException and thrown
8888
* @see SuspendedResourcesHolder

config/seata-config-core/src/main/java/org/apache/seata/config/ConfigurationFactory.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public final class ConfigurationFactory {
5959
public static volatile FileConfiguration ORIGIN_FILE_INSTANCE = null;
6060

6161
static {
62-
initOriginConfiguraction();
62+
initOriginConfiguration();
6363
load();
6464
maybeNeedOriginFileInstance();
6565
}
@@ -83,7 +83,7 @@ private static void load() {
8383
CURRENT_FILE_INSTANCE = extConfiguration == null ? configuration : extConfiguration;
8484
}
8585

86-
private static void initOriginConfiguraction() {
86+
private static void initOriginConfiguration() {
8787
String seataConfigName = System.getProperty(SYSTEM_PROPERTY_SEATA_CONFIG_NAME);
8888
if (seataConfigName == null) {
8989
seataConfigName = System.getenv(ENV_SEATA_CONFIG_NAME);
@@ -225,7 +225,7 @@ private static Configuration getNonSpringConfiguration(String configTypeName) {
225225

226226
public static void reload() {
227227
ConfigurationCache.clear();
228-
initOriginConfiguraction();
228+
initOriginConfiguration();
229229
load();
230230
maybeNeedOriginFileInstance();
231231
instance = null;

console/src/main/java/org/apache/seata/console/security/CustomUserDetails.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.springframework.security.core.userdetails.UserDetails;
2424

2525
/**
26-
* custem user
26+
* custom user
2727
*
2828
*/
2929
public class CustomUserDetails implements UserDetails {

console/src/main/java/org/apache/seata/console/security/CustomUserDetailsServiceImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.springframework.stereotype.Service;
2727

2828
/**
29-
* Custem user service
29+
* Custom user service
3030
*
3131
*/
3232
@Service

core/src/main/java/org/apache/seata/core/exception/TransactionExceptionCode.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public enum TransactionExceptionCode {
105105
/**
106106
* Failed to lock global transaction exception code.
107107
*/
108-
FailedLockGlobalTranscation,
108+
FailedLockGlobalTransaction,
109109

110110
/**
111111
* FailedWriteSession

core/src/main/java/org/apache/seata/core/protocol/Protocol.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public enum Protocol {
2424
/**
2525
* grpc
2626
*/
27-
GPRC("grpc"),
27+
GRPC("grpc"),
2828

2929
/**
3030
* seata

core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientBootstrap.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void start() {
139139
@Override
140140
public void initChannel(SocketChannel ch) {
141141
ChannelPipeline pipeline = ch.pipeline();
142-
if (nettyClientConfig.getProtocol().equals(Protocol.GPRC.value)) {
142+
if (nettyClientConfig.getProtocol().equals(Protocol.GRPC.value)) {
143143
pipeline.addLast(Http2FrameCodecBuilder.forClient().build())
144144
.addLast(new Http2MultiplexHandler(new ChannelDuplexHandler()));
145145
} else {
@@ -191,7 +191,7 @@ public Channel getNewChannel(InetSocketAddress address) {
191191
channel = f.channel();
192192
}
193193

194-
if (nettyClientConfig.getProtocol().equals(Protocol.GPRC.value)) {
194+
if (nettyClientConfig.getProtocol().equals(Protocol.GRPC.value)) {
195195
Http2StreamChannelBootstrap bootstrap = new Http2StreamChannelBootstrap(channel);
196196
bootstrap.handler(new ChannelInboundHandlerAdapter() {
197197
@Override

rm-datasource/src/main/java/org/apache/seata/rm/datasource/undo/oracle/OracleUndoInsertExecutor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.apache.seata.sqlparser.util.JdbcConstants;
3434

3535
/**
36-
* The type oralce undo insert executor.
36+
* The type oracle undo insert executor.
3737
*
3838
*/
3939
public class OracleUndoInsertExecutor extends AbstractUndoExecutor {

rm-datasource/src/test/java/org/apache/seata/rm/datasource/exec/MySQLInsertExecutorTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public void testBeforeAndAfterImageColumnWithQuote() throws SQLException {
225225

226226
@Test
227227
public void testBeforeAndAfterImageUpperColumn() throws SQLException {
228-
String sql = "insert into table_insert_executor_test(ID, USER_ID, NMAE, SEX) values (1, 1, 'will', 1)";
228+
String sql = "insert into table_insert_executor_test(ID, USER_ID, NAME, SEX) values (1, 1, 'will', 1)";
229229
List<SQLStatement> asts = SQLUtils.parseStatements(sql, JdbcConstants.MYSQL);
230230
MySQLInsertRecognizer recognizer = new MySQLInsertRecognizer(sql, asts.get(0));
231231
newInsertExecutor = new MySQLInsertExecutor(newStatementProxy, (statement, args) -> null, recognizer);

saga/seata-saga-processctrl/src/main/java/org/apache/seata/saga/proctrl/eventing/impl/ProcessCtrlEventPublisher.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.apache.seata.saga.proctrl.eventing.EventPublisher;
2323

2424
/**
25-
* ProcessCtrl Event Pulisher
25+
* ProcessCtrl Event Publisher
2626
*
2727
*/
2828
public class ProcessCtrlEventPublisher implements EventPublisher<ProcessContext> {

saga/seata-saga-statelang/src/main/java/org/apache/seata/saga/statelang/parser/impl/ServiceTaskStateParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.apache.seata.saga.statelang.parser.StateParser;
2525

2626
/**
27-
* ServcieTaskTask parser
27+
* ServiceTaskTask parser
2828
*
2929
*/
3030
public class ServiceTaskStateParser extends AbstractTaskStateParser implements StateParser<ServiceTaskState> {

server/src/main/java/org/apache/seata/server/session/GlobalSession.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ public void lock() throws TransactionException {
757757
} catch (InterruptedException e) {
758758
LOGGER.error("Interrupted error", e);
759759
}
760-
throw new GlobalTransactionException(TransactionExceptionCode.FailedLockGlobalTranscation, "Lock global session failed");
760+
throw new GlobalTransactionException(TransactionExceptionCode.FailedLockGlobalTransaction, "Lock global session failed");
761761
}
762762

763763
public void unlock() {

server/src/main/java/org/apache/seata/server/storage/SessionConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ public static void convertToGlobalSessionVo(List<GlobalSessionVO> result, List<G
149149
BeanUtils.copyProperties(globalSession,globalSessionVO);
150150
globalSessionVO.setStatus(globalSession.getStatus().getCode());
151151
globalSessionVO.setTimeout(Long.valueOf(globalSession.getTimeout()));
152-
globalSessionVO.setBranchSessionVOs(converToBranchSession(globalSession.getBranchSessions()));
152+
globalSessionVO.setBranchSessionVOs(convertToBranchSession(globalSession.getBranchSessions()));
153153
result.add(globalSessionVO);
154154
}
155155
}
156156
}
157157

158-
public static Set<BranchSessionVO> converToBranchSession(List<BranchSession> branchSessions) {
158+
public static Set<BranchSessionVO> convertToBranchSession(List<BranchSession> branchSessions) {
159159
Set<BranchSessionVO> branchSessionVOs = new HashSet<>(branchSessions.size());
160160
if (CollectionUtils.isNotEmpty(branchSessions)) {
161161
for (BranchSession branchSession : branchSessions) {

sqlparser/seata-sqlparser-core/src/test/java/org/apache/seata/sqlparser/struct/ColumnMetaTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void testSetGetColumnSize() {
108108
}
109109

110110
@Test
111-
public void testSetGetDemicalDigits() {
111+
public void testSetGetDecimalDigits() {
112112
ColumnMeta columnMeta = new ColumnMeta();
113113
columnMeta.setDecimalDigits(2);
114114
assertEquals(2, columnMeta.getDecimalDigits());

test-mock-server/src/main/java/org/apache/seata/mockserver/MockCoordinator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public void setRemotingServer(RemotingServer remotingServer) {
245245
}
246246

247247

248-
public void setExepectedResult(String xid, ResultCode expected) {
248+
public void setExpectedResult(String xid, ResultCode expected) {
249249
expectedResultMap.put(xid, expected);
250250
}
251251

test-mock-server/src/main/java/org/apache/seata/mockserver/controller/MockHelpController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public String health() {
3939

4040
@PostMapping("/expect/result")
4141
public String expectResult(@RequestParam String xid, @RequestParam int code) {
42-
MockCoordinator.getInstance().setExepectedResult(xid, ResultCode.get(code));
42+
MockCoordinator.getInstance().setExpectedResult(xid, ResultCode.get(code));
4343
return OK;
4444
}
4545

test/src/test/java/org/apache/seata/core/rpc/netty/TmNettyClientTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public void testSendMsgWithResponse() throws Exception {
180180
BranchRegisterRequest request = new BranchRegisterRequest();
181181
request.setXid("127.0.0.1:8091:1249853");
182182
request.setLockKey("lock key testSendMsgWithResponse");
183-
request.setResourceId("resoutceId1");
183+
request.setResourceId("resourceId1");
184184
BranchRegisterResponse branchRegisterResponse = (BranchRegisterResponse) tmNettyRemotingClient.sendSyncRequest(request);
185185
Assertions.assertNotNull(branchRegisterResponse);
186186
Assertions.assertEquals(ResultCode.Failed, branchRegisterResponse.getResultCode());

test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/MockGrpcServerTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class MockGrpcServerTest {
4949
public static void before() {
5050
ConfigurationFactory.reload();
5151
ConfigurationTestHelper.putConfig(ConfigurationKeys.SERVER_SERVICE_PORT_CAMEL, String.valueOf(ProtocolTestConstants.MOCK_SERVER_PORT));
52-
ConfigurationTestHelper.putConfig(ConfigurationKeys.TRANSPORT_PROTOCOL, Protocol.GPRC.value);
52+
ConfigurationTestHelper.putConfig(ConfigurationKeys.TRANSPORT_PROTOCOL, Protocol.GRPC.value);
5353
MockServer.start(ProtocolTestConstants.MOCK_SERVER_PORT);
5454
TmNettyRemotingClient.getInstance().destroy();
5555
RmNettyRemotingClient.getInstance().destroy();

test/src/test/java/org/apache/seata/core/rpc/netty/mockserver/TmClientTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static void testTm() throws Exception {
6464
LOGGER.info("globalReport ok:" + globalReport);
6565
Assertions.assertEquals(globalReport, GlobalStatus.Committed);
6666

67-
MockCoordinator.getInstance().setExepectedResult(xid, ResultCode.Failed);
67+
MockCoordinator.getInstance().setExpectedResult(xid, ResultCode.Failed);
6868
// GlobalStatus globalReport2 = tm.globalReport(xid, GlobalStatus.Committed);
6969

7070
GlobalStatus rollback2 = tm.rollback(xid);

tm/src/main/java/org/apache/seata/tm/api/GlobalTransaction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public interface GlobalTransaction extends BaseTransaction {
8181
/**
8282
* Suspend the global transaction.
8383
*
84-
* @param clean the clean if true, clean the transaction context. otherwise,supend only
84+
* @param clean the clean if true, clean the transaction context. otherwise,suspend only
8585
* @return the SuspendedResourcesHolder which holds the suspend resources
8686
* @throws TransactionException Any exception that fails this will be wrapped with TransactionException and thrown
8787
* @see SuspendedResourcesHolder

0 commit comments

Comments
 (0)