Closed dukbong closed 2 months ago
Excessive switching from
if
statements that throw an exception intoAssert
utility usage is counterintuitive in many places. There are also occurrences that change the thrown exception type.It makes sense to revisit
Assert
usages in combination withString.format
to defer message creation. However, in places that explicitly throw exceptions, we would like to keep the code as-is. Once an exception is being thrown, we need to construct the message and that is a fine arrangement already.
I apologize for negatively impacting the open-source project management. I will close this PR and resubmit it with only the necessary operations from commit 33eb67a.
Before sending the PR, I will ensure that it is thoroughly checked multiple times.
I'm sorry again for the inconvenience caused.
Excessive switching from
if
statements that throw an exception intoAssert
utility usage is counterintuitive in many places. There are also occurrences that change the thrown exception type. It makes sense to revisitAssert
usages in combination withString.format
to defer message creation. However, in places that explicitly throw exceptions, we would like to keep the code as-is. Once an exception is being thrown, we need to construct the message and that is a fine arrangement already.I apologize for negatively impacting the open-source project management. I will close this PR and resubmit it with only the necessary operations from commit 33eb67a.
Before sending the PR, I will ensure that it is thoroughly checked multiple times.
I'm sorry again for the inconvenience caused.
First of all, do not worry, and there's no need to apologize. We're happy to provide guidance.
Please also note that you can force-push into a pull request until the final merge so that you can reuse already open pull requests.
Oh, I wasn't aware of that. I have now created a separate PR for the parts that urgently need to be fixed. I'll keep this in mind and use it more effectively going forward.
This PR improved the code by using Assert methods instead of throwing IllegalArgumentException in if-else statements.
33eb67a : fixed an issue where the computation was processed immediately due to instant evaluation, regardless of the Assert outcome.
[ ] You have read the Spring Data contribution guidelines.
[ ] You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
[ ] You submit test cases (unit or integration tests) that back your changes.
[ ] You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).