Skip to content

Allow for non-void method calls in outbound channel adapter expression [INT-3815] #7769

Open
@spring-operator

Description

@spring-operator

Mauro Molinari opened INT-3815 and commented

Right now, the SpEL expression I specify on an <int:outbound-channel-adapter> requires a void-returning expression, otherwise an exception is thrown.
However, this is limiting. What if I just want to call a method and ignore its return value?

In my case, I have a flow that ends in an outbound adapter that should just delete a temporary file. However File.delete() returns a boolean value, which I'm not interested in. Hence, an expression like payload.file.delete() throws a ConversionNotSupportedException, so now I have to wrap that expression into a ad-hoc service method call.

Is there a strong reason for requiring a void returning expression?


Affects: 4.1.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions