Skip to content

Conversation

artembilan
Copy link
Member

Fixes: #6375

  • Move respective classes to the inbound, outbound or support packages to make the whole picture for the API more concise and clean

The firs commit is for stream module

@artembilan artembilan requested a review from cppwfs October 2, 2025 17:51
@artembilan
Copy link
Member Author

This is not too hard task moving classes from one package to another with respective @Deprecated routine, but this might be hard to review.
Just because the code has been copied/pasted and looks like a new now.
So, let me know if you still would like this PRs approach or that wouldbe OK if I just do the stuff and push to main.

I have changed the comment in the issue to checkboxes, so we may even divide those packages between us.

I decided to go with a @Deprecated instead of plain move for easier migration even if we are in a major right now.

Any feedback welcome!

Thanks

@artembilan
Copy link
Member Author

I think that's enough for now.
It might be easier to review commit by commit, since each of them belongs to the specific module.
However, it is still hard because the number of changes getting bigger.

Please, let me know if this is OK with you and I'll continue to nail the issue.

Thanks

@artembilan
Copy link
Member Author

So, the PR is getting bigger and bigger.
Just because it is not only move to new packages to come to harmony in the end, but this also causes an entropy to preserve old classes with deprecation mark.
I also move test classes into new packages as well.
Therefore, I'm not sure what you'd like to review here.
Just let me know how you feel about this overhaul!

I'm going to push more since I got this spare time and it makes sense for the current major we are about to finish.

Thank you for your time since I feel guilty to waste it on this huge PR review 😄

Copy link
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

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

What a PR! 😆

Great work! Breaking up the inbound and outbound classes into their own packages makes perfect sense.

Just my usual nitpicks.

public void doWithMessageInternal(WebServiceMessage message, Object payload) throws IOException {
}

super(destinationProvider, webServiceTemplate);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm debating... Do we need tests on the constructors in the deprecated classes?
My hyper nitpicky voice in the back of my head said we should at least mention it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I could not find yet a decent reason in my guts to cover deprecated classes with tests.
I treat deprecated API from my dependencies as obsolete, therefore it might be broken.
So, I switch to a new API as soon as possible.

But I may consider to have coverage for deprecated as well if you give me more arguments.
Plus, I have you as extra help to do that supporting work 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

In the code review, I really didn't see an appreciable benefit to adding them.
I think the rule is, if you add anything outside super(...) then a test would be required.
But as with anything, it was worth mentioning.

@mrpiggi
Copy link
Contributor

mrpiggi commented Oct 6, 2025

This is not too hard task moving classes from one package to another with respective @Deprecated routine, but this might be hard to review. Just because the code has been copied/pasted and looks like a new now. So, let me know if you still would like this PRs approach or that wouldbe OK if I just do the stuff and push to main.
I decided to go with a @Deprecated instead of plain move for easier migration even if we are in a major right now.

Looks like a very tedious task. Just be aware, that if you proceed in this manner, you will actually lose the git history of all the moved files. If you want to retain the history you would have to do the moving in one commit and re-introduce the now deprecated classes as new ones in a subsequent commit. Not sure, if it's worth the effort but I just wanted to mention it.

@cppwfs
Copy link
Contributor

cppwfs commented Oct 6, 2025

Thank you for your comment it is very much appreciated.
Even after the removal of the deprecated versions from the main branch, the original classes are still be accessible in all previous tags and branches with their complete history. However, it is an additional step to do a blame.

@artembilan
Copy link
Member Author

do the moving in one commit and re-introduce the now deprecated classes as new ones

That is great idea!
I don't think I'll revert anything what I have done so far, but I'll try to follow your recommendations for two remaining modules.

Thank you for review!

in all previous tags and branches with their complete history

Yeah... Unfortunately, after removing deprecated classes in the next version we won't have their mentioning anywhere to follow the history.

Copy link
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

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

LGTM
Do you want me to merge and we start a new PR for the rest of the work, or continue with this PR?

@artembilan
Copy link
Member Author

or continue with this PR?

There are just only two modules left.
And I'm at the moment on JDBC.
So, I don't see a reason for a new PR.

Just state tuned!
I'll finish the work for this task today.
Thank you!

@cppwfs
Copy link
Contributor

cppwfs commented Oct 6, 2025

Sounds great!

@artembilan
Copy link
Member Author

Just pushed two commits for JDBC module.
I think that is exactly what you mean about preserving history and blame.

@artembilan
Copy link
Member Author

OK. I think this is all whatever has needed to be done for the issue.

@artembilan artembilan requested a review from cppwfs October 6, 2025 17:02
Copy link
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

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

Looks good.
Just a question and a quick doc fix and its ready to go.

/**
* Base package for TCP Support.
*/
@org.jspecify.annotations.NullMarked
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be readded for the deprecated classes?

Fixes: spring-projects#6375

* Move respective classes to the `inbound`, `outbound` or `support` packages
to make the whole picture for the API more concise and clean

The firs commit is for `stream` module
* Improve `ws.adoc` to avoid `foo`, `bar` etc.
* Move inbound channel adapters into a new `inbound` package
* Move outbound channel adapters into a new `outbound` package
* Preserve existing classes in the root package as deprecated
and as extensions of new classes
* Move inbound channel adapters into a new `inbound` package
* Move outbound channel adapters into a new `outbound` package
* Preserve existing classes in the root package as deprecated
and as extensions of new classes
* Some tests refactoring according to modern AssertJ API
* Fix typos in `jmx.adoc`
* Move inbound channel adapters into a new `inbound` package
* Move outbound channel adapters into a new `outbound` package
* Preserve existing classes in the root package as deprecated
and as extensions of new classes
* Some tests refactoring (affected files) according to modern AssertJ API
* Move inbound channel adapters into a new `inbound` package
* Move outbound channel adapters into a new `outbound` package
* Move channels into a new `channel` package
* Preserve existing classes in the root package as deprecated
and as extensions of new classes
* Some tests refactoring (affected files) according to modern AssertJ API
* Use now a new in SF `SimpleDestinationResolver` for optimization with caching
…ively

* Revise affected tests for the modern AssertJ API
and as extensions of moved classes to `inbound` & `outbound` packages
`tcp/outbound`, `udp/inbound` or `udp/outbound` packages, respectively.
* Some code clean up for the affected classes and tests improvements
according to AssertJ API
to preserve commit history.
And mark them as `@Deprecated`
* Bring back `package-info.java` for the `org.springframework.integration.ip.tcp`
where we still have deprecated classes
Copy link
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

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

LGTM.

Want me to merge?

@artembilan artembilan merged commit ef6722c into spring-projects:main Oct 6, 2025
3 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.

Standardize Package Structure across Modules [INT-2389]
3 participants