Skip to content
Snippets Groups Projects
Unverified Commit eee0c741 authored by RainGan's avatar RainGan Committed by GitHub
Browse files

optimize: String comparison uses equalsIgnoreCase() (#3466)

parent ded2c838
No related branches found
Tags 5.10.0-60.60.0
No related merge requests found
......@@ -60,6 +60,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#3420](https://github.com/seata/seata/pull/3420)] 优化枚举类并添加单元测试
- [[#3436](https://github.com/seata/seata/pull/3436)] 优化SQLType类中的错别字
- [[#3439](https://github.com/seata/seata/pull/3439)] 调整springApplicationContextProvider的顺序以使得他可以在xml的bean之前被调用
- [[#3466](https://github.com/seata/seata/pull/3466)] 优化ExecuteTemplateXA类中判断XA不是最终状态的比较方式
### test
......
......@@ -59,6 +59,7 @@
- [[#3420](https://github.com/seata/seata/pull/3420)] optimize enumerated classes and add unit tests
- [[#3436](https://github.com/seata/seata/pull/3436)] optimize typo in SQLType class
- [[#3439](https://github.com/seata/seata/pull/3439)] adjust the order of springApplicationContextProvider
- [[#3466](https://github.com/seata/seata/pull/3466)] optimize the comparison in the ExecuteTemplateXa class to determine that XA is not the final state
### test
......
......@@ -51,7 +51,7 @@ public class MultiExecutor<T, S extends Statement> extends AbstractDMLBaseExecut
*
* @param statementProxy the statement proxy
* @param statementCallback the statement callback
* @param sqlRecognizer the sql recognizer
* @param sqlRecognizers the sql recognizers
*/
public MultiExecutor(StatementProxy<S> statementProxy, StatementCallback<T, S> statementCallback, List<SQLRecognizer> sqlRecognizers) {
super(statementProxy, statementCallback, sqlRecognizers);
......
......@@ -76,7 +76,7 @@ public class ExecuteTemplateXA {
"Failed to commit xa branch of " + connectionProxyXA.xid + ") since " + ex.getMessage(),
ex);
// XA End & Rollback
if (!(ex instanceof SQLException) || AbstractConnectionProxyXA.SQLSTATE_XA_NOT_END != ((SQLException) ex).getSQLState()) {
if (!(ex instanceof SQLException) || !AbstractConnectionProxyXA.SQLSTATE_XA_NOT_END.equalsIgnoreCase(((SQLException) ex).getSQLState())) {
try {
connectionProxyXA.rollback();
} catch (SQLException sqle) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment