You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When implementing some functions for Spring Cloud Stream, I noticed that it only supports functions that extend from Consumer, Supplier, and Function. Java 8 functions also has support for primitives with the use of interfaces such as IntConsumer, IntSupplier, IntFunction, and ToIntFunction. There are also long and double versions of each.
org.springframework.cloud.function.context.catalog.FunctionTypeUtils has a check in assertSupportedTypes that doesn't check for these other types.
I'd like to see these other interfaces supported so primitive types can be used without the need for boxing/unboxing. I've considered using boxed types, but do not like that approach due to performance impacts.
The level of complexity it would introduce to the current code base would probably be a bit disproportionate to the end benefit. However I did not have a proper chance to investigate it nor has it ever been requested.
In other words it would definitely be of lowest priority. That said if you want to take a shot at it, i would gladly review the PR, so let me know.
Activity
olegz commentedon Mar 27, 2024
The level of complexity it would introduce to the current code base would probably be a bit disproportionate to the end benefit. However I did not have a proper chance to investigate it nor has it ever been requested.
In other words it would definitely be of lowest priority. That said if you want to take a shot at it, i would gladly review the PR, so let me know.
[-]Support primative function interfaces[/-][+]Support primitive function interfaces[/+]github-actions commentedon Oct 24, 2024
This issue has been stale for over 60 days
JunggiKim commentedon Oct 26, 2024
Hello I would like to participate in this contribution is that ok?
gh-1098 Java's basic type