Skip to content

Commit

Permalink
optimize: optimize code format (apache#6516)
Browse files Browse the repository at this point in the history
  • Loading branch information
slievrly authored May 1, 2024
1 parent 4f16097 commit 37e7746
Show file tree
Hide file tree
Showing 141 changed files with 664 additions and 161 deletions.
6 changes: 5 additions & 1 deletion changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6385](https://github.com/apache/incubator-seata/pull/6385)] fix the bug where Role.participant does not execute hooks but clears them.
- [[#6465](https://github.com/apache/incubator-seata/pull/6465)] fix(6257): fix saga mode replay context lost start in 2.x
- [[#6469](https://github.com/apache/incubator-seata/pull/6469)] fix Error in insert sql of [lock_table] data table to sqlserver database
- [[#6492](https://github.com/apache/incubator-seata/pull/6492)] fix XA did not rollback but close when executing a long-running SQL(or deadlock SQL)
- [[#6496](https://github.com/apache/incubator-seata/pull/6496)] fix XA did not rollback but close when executing a long-running SQL(or deadlock SQL)
- [[#6493](https://github.com/apache/incubator-seata/pull/6493)] fix SQLServer-related SQL error in seata server when using database of SQLServer
- [[#6497](https://github.com/apache/incubator-seata/pull/6497)] fix tcc properties class when autoconfigure

Expand Down Expand Up @@ -127,6 +127,8 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6405](https://github.com/apache/incubator-seata/pull/6405)] fix kotlin compile failure
- [[#6412](https://github.com/apache/incubator-seata/pull/6412)] optimize core compatible module
- [[#6429](https://github.com/apache/incubator-seata/pull/6429)] remove repetitive words
- [[#6458](https://github.com/apache/incubator-seata/pull/6458)] add null value check for MAC address
- [[#6516](https://github.com/apache/incubator-seata/pull/6516)] optimize code format

### security:
- [[#6069](https://github.com/apache/incubator-seata/pull/6069)] Upgrade Guava dependencies to fix security vulnerabilities
Expand Down Expand Up @@ -190,5 +192,7 @@ Thanks to these contributors for their code commits. Please report an unintended
- [tanyaofei](https://github.com/tanyaofei)
- [xjlgod](https://github.com/xjlgod)
- [TakeActionNow2019](https://github.com/TakeActionNow2019)
- [sunxunle](https://github.com/sunxunle)
- [bageyang](https://github.com/bageyang)

Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
13 changes: 6 additions & 7 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- [[#6385](https://github.com/apache/incubator-seata/pull/6385)] 修复Role.Participant不执行hook但会清理的问题
- [[#6465](https://github.com/apache/incubator-seata/pull/6465)] 修复2.0下saga模式的context replay丢失start问题
- [[#6469](https://github.com/apache/incubator-seata/pull/6469)] 修复在sqlserver数据库下[lock_table]数据表的插入操作sql中存在的错误
- [[#6492](https://github.com/apache/incubator-seata/pull/6492)] 修复XA执行长时间SQL(或死锁SQL)没有完成回滚就释放连接
- [[#6496](https://github.com/apache/incubator-seata/pull/6496)] 修复XA执行长时间SQL(或死锁SQL)没有完成回滚就释放连接
- [[#6493](https://github.com/apache/incubator-seata/pull/6493)] 修复当使用数据库为SQLServer时seata server的SQL报错
- [[#6497](https://github.com/apache/incubator-seata/pull/6497)] 修复自动装配时的seata tcc 配置类

Expand Down Expand Up @@ -123,13 +123,11 @@
- [[#6427](https://github.com/apache/incubator-seata/pull/6427)] 支持spi、saga、spring模块的向下兼容
- [[#6442](https://github.com/apache/incubator-seata/pull/6442)] 阐明 if
- [[#6487](https://github.com/apache/incubator-seata/pull/6487)] 修复错误包名以及单词

### refactor:
- [[#6269](https://github.com/apache/incubator-seata/pull/6269)] 统一Seata异常规范
- [[#6458](https://github.com/apache/incubator-seata/pull/6458)] 增加MAC地址null值检查
- [[#6516](https://github.com/apache/incubator-seata/pull/6516)] 优化代码格式
- [[#6429](https://github.com/apache/incubator-seata/pull/6429)] 移除重复注释
- [[#6405](https://github.com/apache/incubator-seata/pull/6405)] 修复 kotlin 编译失败
- [[#6412](https://github.com/apache/incubator-seata/pull/6412)] 优化 core 兼容模块
- [[#6429](https://github.com/apache/incubator-seata/pull/6429)] 移除重复注释


### security:
- [[#6069](https://github.com/apache/incubator-seata/pull/6069)] 升级Guava依赖版本,修复安全漏洞
Expand All @@ -156,7 +154,6 @@
- [[#6280](https://github.com/apache/incubator-seata/pull/6280)] 使用diagram-js重构Saga设计器
- [[#6269](https://github.com/apache/incubator-seata/pull/6269)] 统一Seata异常规范
- [[#6420](https://github.com/apache/incubator-seata/pull/6420)] 优化配置缓存
- [[#6269](https://github.com/apache/incubator-seata/pull/6269)] 统一Seata异常规范

非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。

Expand Down Expand Up @@ -192,5 +189,7 @@
- [tanyaofei](https://github.com/tanyaofei)
- [xjlgod](https://github.com/xjlgod)
- [TakeActionNow2019](https://github.com/TakeActionNow2019)
- [sunxunle](https://github.com/sunxunle)
- [bageyang](https://github.com/bageyang)

同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ public RepeatRegistrationException(String message, Throwable cause) {
public RepeatRegistrationException(Throwable cause) {
super(cause);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ void testRepeatRegistrationException() {
})
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ public void execute() throws Throwable {
Assertions.assertEquals("str val with placeholder ERR NEST TEST", parseValue);
Assertions.assertEquals(0, placeholderSet.size());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ void testFillInStackTrace() {
assertNull(skipCallbackWrapperException.fillInStackTrace());

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ void shouldReturnTrueForDistinctKeys() {
boolean result = distinctByKey.test(new Object());
assertTrue(result);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package io.seata.common;

@Deprecated
public enum LockStrategyMode {
/**
* Optimistic lock mode is recommended when resources are not reused in the current global transaction.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* https://github.com/apache/dubbo-spi-extensions/blob/master/dubbo-filter-extensions/dubbo-filter-seata/src/main
* /java/org/apache/dubbo/seata/SeataTransactionPropagationProviderFilter.java
*/
@Deprecated
public class StringUtils {
/**
* Is empty boolean.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* The type AuthSigner
* Notes: used for io.seata SPI interface
*/
@Deprecated
public interface AuthSigner extends org.apache.seata.core.auth.AuthSigner {

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* The type Compressor
* Notes: used for io.seata SPI interface
*/
@Deprecated
public interface Compressor extends org.apache.seata.core.compressor.Compressor {

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
/**
* Compatible for dubbo dubbo-filter-seata
*/
@Deprecated
public class DubboConstants extends org.apache.seata.core.constants.DubboConstants {
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
* The interface Context core.
* Notes: used for io.seata SPI interface
*/
@Deprecated
public interface ContextCore extends org.apache.seata.core.context.ContextCore {
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/**
* The type Root context.
*/
@Deprecated
public class RootContext {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/**
* The type Transaction exception.
*/
@Deprecated
public class TransactionException extends org.apache.seata.core.exception.TransactionException {

public TransactionException(TransactionExceptionCode code) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* The enum Transaction exception code.
*
*/
@Deprecated
public enum TransactionExceptionCode {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Compatible for dubbo dubbo-filter-seata
*
*/
@Deprecated
public enum BranchType {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* Status of global transaction.
*
*/
@Deprecated
public enum GlobalStatus {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
/**
* @see EnhancedServiceLoader.InnerEnhancedServiceLoader#findAllExtensionDefinition(ClassLoader)
*/
@Deprecated
public interface ResourceManager extends org.apache.seata.core.model.ResourceManager {
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* RmNettyRemotingClient
* Notes: used for Apache ShardingSphere integration
*/
@Deprecated
public class RmNettyRemotingClient {

private static final org.apache.seata.core.rpc.netty.RmNettyRemotingClient INSTANCE = org.apache.seata.core.rpc.netty.RmNettyRemotingClient.getInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* TmNettyRemotingClient
* Notes: used for Apache ShardingSphere integration
*/
@Deprecated
public class TmNettyRemotingClient {
private static final org.apache.seata.core.rpc.netty.TmNettyRemotingClient INSTANCE = org.apache.seata.core.rpc.netty.TmNettyRemotingClient.getInstance();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
* The interface Codec.
* Notes: used for io.seata SPI interface
*/
@Deprecated
public interface Serializer extends org.apache.seata.core.serializer.Serializer {
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* @since 1.2.0
* Notes: used for io.seata SPI interface
*/
@Deprecated
public interface LockStoreSql extends org.apache.seata.core.store.db.sql.lock.LockStoreSql {

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
* The interface Log store sqls.
* Notes: used for io.seata SPI interface
*/
@Deprecated
public interface LogStoreSqls extends org.apache.seata.core.store.db.sql.log.LogStoreSqls {
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
* The interface Load balance.
* Notes: used for io.seata SPI interface
*/
@Deprecated
public interface LoadBalance extends org.apache.seata.discovery.loadbalance.LoadBalance {
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* the interface registry provider
* Notes: used for io.seata SPI interface
*/
@Deprecated
public interface RegistryProvider extends org.apache.seata.discovery.registry.RegistryProvider{
/**
* provide a registry implementation instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@
*/
package io.seata.discovery.registry;


/**
* The interface Registry service.
*
* @param <T> the type parameter
*/
@Deprecated
public interface RegistryService<T> extends org.apache.seata.discovery.registry.RegistryService<T>{}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
*/
package io.seata.integration.grpc.interceptor.client;

/**
* The type Client transaction interceptor.
*/
@Deprecated
public class ClientTransactionInterceptor
extends org.apache.seata.integration.grpc.interceptor.client.ClientTransactionInterceptor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
*/
package io.seata.integration.grpc.interceptor.server;

/**
* The type Server transaction interceptor.
*/
@Deprecated
public class ServerTransactionInterceptor extends org.apache.seata.integration.grpc.interceptor.server.ServerTransactionInterceptor{}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;

/**
* The type Default http executor.
*/
@Deprecated
public class DefaultHttpExecutor {

private static final org.apache.seata.integration.http.DefaultHttpExecutor INSTANCE
Expand All @@ -33,30 +37,80 @@ private DefaultHttpExecutor(final org.apache.seata.integration.http.DefaultHttpE
this.targetDefaultHttpExecutor = innerInstance;
}

/**
* Gets instance.
*
* @return the instance
*/
public static DefaultHttpExecutor getInstance() {
return new DefaultHttpExecutor(INSTANCE);
}

/**
* Build client entity.
*
* @param <T> the type parameter
* @param httpClient the http client
* @param paramObject the param object
*/
public <T> void buildClientEntity(CloseableHttpClient httpClient, T paramObject) {
this.targetDefaultHttpExecutor.buildClientEntity(httpClient, paramObject);
}

/**
* Build get headers.
*
* @param <T> the type parameter
* @param headers the headers
* @param paramObject the param object
*/
public <T> void buildGetHeaders(Map<String, String> headers, T paramObject) {
this.targetDefaultHttpExecutor.buildGetHeaders(headers, paramObject);
}

/**
* Init get url string.
*
* @param host the host
* @param path the path
* @param querys the querys
* @return the string
*/
public String initGetUrl(String host, String path, Map<String, String> querys) {
return this.targetDefaultHttpExecutor.initGetUrl(host, path, querys);
}

/**
* Build post headers.
*
* @param <T> the type parameter
* @param headers the headers
* @param t the t
*/
public <T> void buildPostHeaders(Map<String, String> headers, T t) {
this.targetDefaultHttpExecutor.buildPostHeaders(headers, t);
}

/**
* Build entity string entity.
*
* @param <T> the type parameter
* @param entity the entity
* @param t the t
* @return the string entity
*/
public <T> StringEntity buildEntity(StringEntity entity, T t) {
return this.targetDefaultHttpExecutor.buildEntity(entity, t);
}

/**
* Convert result k.
*
* @param <K> the type parameter
* @param response the response
* @param clazz the clazz
* @return the k
*/
public <K> K convertResult(HttpResponse response, Class<K> clazz) {
return this.targetDefaultHttpExecutor.convertResult(response, clazz);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
*/
package io.seata.integration.http;

public class JakartaSeataWebMvcConfigurer extends org.apache.seata.integration.http.JakartaSeataWebMvcConfigurer{}
/**
* The type Jakarta seata web mvc configurer.
*/
@Deprecated
public class JakartaSeataWebMvcConfigurer extends org.apache.seata.integration.http.JakartaSeataWebMvcConfigurer{}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
*/
package io.seata.integration.http;

/**
* The type Jakarta transaction propagation interceptor.
*/
@Deprecated
public class JakartaTransactionPropagationInterceptor extends org.apache.seata.integration.http.JakartaTransactionPropagationInterceptor{}
Loading

0 comments on commit 37e7746

Please sign in to comment.