[GitHub] [groovy] eric-milles commented on pull request #1444: GROOVY-9865: Add some DGM methods for primitive arrays
eric-milles commented on pull request #1444: URL: https://github.com/apache/groovy/pull/1444#issuecomment-748486744 Oh, the `stream()` methods are returning `Stream` and not `IntStream` for `int[]`. Since you are in `PluginDefaultGroovyMethods`, can you add `@since` to `orOptional`? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [groovy] eric-milles commented on pull request #1444: GROOVY-9865: Add some DGM methods for primitive arrays
eric-milles commented on pull request #1444: URL: https://github.com/apache/groovy/pull/1444#issuecomment-748339728 Does it make sense to implement `max(int[])` using `IntStream`'s `max` method? Like `IntStream.of(self).max().orElseThrow(() -> new UnsupportedOperationException(...));`? And similarly for long and double arrays? Essentially, the `max` DGM is just shorthand for `ints.stream().max().getAsInt()`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [groovy] eric-milles commented on pull request #1444: GROOVY-9865: Add some DGM methods for primitive arrays
eric-milles commented on pull request #1444: URL: https://github.com/apache/groovy/pull/1444#issuecomment-748335694 > How about adding `stream()` too? As in `int[] arr; Arrays.stream(arr)`? I think `org.codehaus.groovy.vmplugin.v8.PluginDefaultGroovyMethods` covers the relevant cases. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org