Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust MyBatisSystemException to Spring 6 #890

Merged
merged 4 commits into from
Nov 26, 2023

Conversation

harawata
Copy link
Member

Since Spring 6, org.springframework.core.NestedRuntimeException no longer includes the message of the wrapped exception.
spring-projects/spring-framework#25162

Should fix gh-887

Since Spring 6, `org.springframework.core.NestedRuntimeException` no longer includes the message of the wrapped exception.

spring-projects/spring-framework#25162

Should fix mybatisgh-887
@coveralls
Copy link

coveralls commented Nov 23, 2023

Coverage Status

coverage: 89.689% (+0.06%) from 89.633%
when pulling d349069 on harawata:gh/887
into bc7e285 on mybatis:master.

@kazuki43zoo kazuki43zoo self-requested a review November 25, 2023 02:49
Copy link
Member

@kazuki43zoo kazuki43zoo left a comment

Choose a reason for hiding this comment

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

@harawata Thanks!!
I added a few comment, please confirm when you have a time.

@harawata
Copy link
Member Author

harawata commented Nov 26, 2023

@kazuki43zoo ,

Thanks for the review!
I added a series of tests for MyBatisExceptionTranslator.


FYI, while writing the tests, I noticed that TransactionException is not a subclass of DataAccessException.

} else if (e.getCause() instanceof TransactionException) {
throw (TransactionException) e.getCause();
}

Unfortunately, this part is not covered by tests, but it was added as a fix for #115 , it seems.
It might be worth looking into.

Sorry, TransactionException was thrown, not returned, so it should be fine.

Copy link
Member

@kazuki43zoo kazuki43zoo left a comment

Choose a reason for hiding this comment

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

LGTM!

@kazuki43zoo kazuki43zoo merged commit 6daac3d into mybatis:master Nov 26, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MyBatisSystemException message is null
3 participants