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 text was updated successfully, but these errors were encountered:
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.
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 text was updated successfully, but these errors were encountered: