Skip to content

Conversation

@artembilan
Copy link
Member

It is not clear why it does not fail with Gradle, but right now it is not possible to build the project using IDEA compiler.

Some of the suggestions are good and have led to the Nullability fixes in related Java DSL classes. The Any extension requirement for the generic argument of reified types is not clear, but works. The requirement to refine nullable Kotlin types is good.

Somewhat related to: #10083

It is not clear why it does not fail with Gradle, but right now it is not possible to build the project using IDEA compiler.

Some of the suggestions are good and have led to the Nullability fixes in related Java DSL classes.
The `Any` extension requirement for the generic argument of reified types is not clear, but works.
The requirement to refine nullable Kotlin types is good.

Somewhat related to: spring-projects#10083
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 great, I was a bit rusty on my Kotlin...
Just one simple question.

* @return the spec.
*/
public <P> TransformerEndpointSpec expectedType(@Nullable Class<P> expectedType) {
public <P> TransformerEndpointSpec expectedType(Class<P> expectedType) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Question:
Is this a breaking change if we state that expectedType can not be reset to null. If so should we have a note about 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.

Reset?
This is part of Java DSL.
So, or you call this method in builder chain or not.
But if you do, it has to come with the value.
Why would one do:

.expectedType(String.class)
.expectedType(null)

?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree it doesn't make sense. But someone can do it.
Its not a show stopper in any shape. I just like to be annoying. 😆

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! Thanks for investigating and fixing this.

@cppwfs cppwfs merged commit badacb1 into spring-projects:main Aug 13, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants