Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 2 additions & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#7596](https://github.com/apache/incubator-seata/pull/7596)] Fixed the issue where deserialization failed when the xss filter obtained the default keyword
- [[#7613](https://github.com/apache/incubator-seata/pull/7613)] Fixed the SQL error in the datetime format time query in the global lock query
- [[#7624](https://github.com/apache/incubator-seata/pull/7624)] fix the compatibility issue of yml configuration files
- [[#7644](https://github.com/apache/incubator-seata/pull/7644)] fix the compatibility issue of spotless when java 25



Expand Down Expand Up @@ -96,6 +97,7 @@ Thanks to these contributors for their code commits. Please report an unintended
- [WangzJi](https://github.com/WangzJi)
- [Asuka-star](https://github.com/Asuka-star)
- [YoWuwuuuw](https://github.com/YoWuwuuuw)
- [jongmin-chung](https://github.com/jongmin-chung)


Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
3 changes: 2 additions & 1 deletion changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
- [[#7596](https://github.com/apache/incubator-seata/pull/7596)] 修复xss过滤器获取默认关键字时反序列化失败的问题
- [[#7613](https://github.com/apache/incubator-seata/pull/7613)] 修复全局锁查询中的datetime时间格式时间查询sql错误
- [[#7624](https://github.com/apache/incubator-seata/pull/7624)] 修复yml配置文件中对于整数的兼容问题

- [[#7644](https://github.com/apache/incubator-seata/pull/7644)] 修复JAVA25时spotless的兼容性问题

### optimize:

Expand Down Expand Up @@ -97,6 +97,7 @@
- [WangzJi](https://github.com/WangzJi)
- [Asuka-star](https://github.com/Asuka-star)
- [YoWuwuuuw](https://github.com/YoWuwuuuw)
- [jongmin-chung](https://github.com/jongmin-chung)


同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。
16 changes: 3 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,22 +244,12 @@
</profile>

<profile>
<id>jdk11-jdk21-spotless</id>
<id>jdk11-spotless</id>
<activation>
<jdk>[11, 21)</jdk>
</activation>
<properties>
<palantirJavaFormat.version>2.28.0</palantirJavaFormat.version>
</properties>
</profile>

<profile>
<id>jdk21-spotless</id>
<activation>
<jdk>[21,)</jdk>
<jdk>[11,)</jdk>
</activation>
<properties>
<palantirJavaFormat.version>2.39.0</palantirJavaFormat.version>
<palantirJavaFormat.version>2.71.0</palantirJavaFormat.version>
</properties>
</profile>
<profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private void rollbackTransaction(GlobalTransaction tx, Throwable originalExcepti
break;
case TimeoutRollbacked:
case Rollbacked:
// rollback transactions but do not exist are usually considered completed
// rollback transactions but do not exist are usually considered completed
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Java 11, this comment should be indented, but not indented in Java17, Java25, which is a problem.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Java 11, this comment should be indented, but not indented in Java17, Java25, which is a problem.

Yes — with your current changes, everything for Java11 and above should now follow the same coding style, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java 11 (Has Error ❌)

$ sdk use java 11.0.27-librca 
$  ./mvnw spotless:check 

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.3:check (default-cli) on project seata-tm: The following files had format violations:
[ERROR]     src/main/java/org/apache/seata/tm/api/TransactionalTemplate.java
[ERROR]         @@ -290,7 +290,7 @@
[ERROR]          ················break;
[ERROR]          ············case·TimeoutRollbacked:
[ERROR]          ············case·Rollbacked:
[ERROR]         -············//·rollback·transactions·but·do·not·exist·are·usually·considered·completed
[ERROR]         +················//·rollback·transactions·but·do·not·exist·are·usually·considered·completed
[ERROR]          ············case·Finished:
[ERROR]          ················code·=·TransactionalExecutor.Code.RollbackDone;
[ERROR]          ················break;
[ERROR] Run 'mvn spotless:apply' to fix these violations.

Java 17 and above (✅)

$ sdk use java 17.0.16-librca (java 21, java 25 OK)
$  ./mvnw spotless:check 

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.3:check (default-cli) on project seata-tm: The following files had format violations:
[ERROR]     src/main/java/org/apache/seata/tm/api/TransactionalTemplate.java
[ERROR]         @@ -290,7 +290,7 @@
[ERROR]          ················break;
[ERROR]          ············case·TimeoutRollbacked:
[ERROR]          ············case·Rollbacked:
[ERROR]         -················//·rollback·transactions·but·do·not·exist·are·usually·considered·completed
[ERROR]         +············//·rollback·transactions·but·do·not·exist·are·usually·considered·completed
[ERROR]          ············case·Finished:
[ERROR]          ················code·=·TransactionalExecutor.Code.RollbackDone;
[ERROR]          ················break;
[ERROR] Run 'mvn spotless:apply' to fix these violations.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :seata-tm

This is the situation above, so there's no problem starting with Java 17 or later.

I have a problem with Java 11. And this happens unconditionally because the position of the comment changes.

What should I do in this situation? (In CI, Java 17 is set, so there is no problem.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java 11 (Has Error ❌)

$ sdk use java 11.0.27-librca 
$  ./mvnw spotless:check 

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.3:check (default-cli) on project seata-tm: The following files had format violations:
[ERROR]     src/main/java/org/apache/seata/tm/api/TransactionalTemplate.java
[ERROR]         @@ -290,7 +290,7 @@
[ERROR]          ················break;
[ERROR]          ············case·TimeoutRollbacked:
[ERROR]          ············case·Rollbacked:
[ERROR]         -············//·rollback·transactions·but·do·not·exist·are·usually·considered·completed
[ERROR]         +················//·rollback·transactions·but·do·not·exist·are·usually·considered·completed
[ERROR]          ············case·Finished:
[ERROR]          ················code·=·TransactionalExecutor.Code.RollbackDone;
[ERROR]          ················break;
[ERROR] Run 'mvn spotless:apply' to fix these violations.

Java 17 and above (✅)

$ sdk use java 17.0.16-librca (java 21, java 25 OK)
$  ./mvnw spotless:check 

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.3:check (default-cli) on project seata-tm: The following files had format violations:
[ERROR]     src/main/java/org/apache/seata/tm/api/TransactionalTemplate.java
[ERROR]         @@ -290,7 +290,7 @@
[ERROR]          ················break;
[ERROR]          ············case·TimeoutRollbacked:
[ERROR]          ············case·Rollbacked:
[ERROR]         -················//·rollback·transactions·but·do·not·exist·are·usually·considered·completed
[ERROR]         +············//·rollback·transactions·but·do·not·exist·are·usually·considered·completed
[ERROR]          ············case·Finished:
[ERROR]          ················code·=·TransactionalExecutor.Code.RollbackDone;
[ERROR]          ················break;
[ERROR] Run 'mvn spotless:apply' to fix these violations.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :seata-tm

This is the situation above, so there's no problem starting with Java 17 or later.

I have a problem with Java 11. And this happens unconditionally because the position of the comment changes.

What should I do in this situation? (In CI, Java 17 is set, so there is no problem.)

Have you consulted the Spotless community about how to resolve this issue?

case Finished:
code = TransactionalExecutor.Code.RollbackDone;
break;
Expand Down
Loading