Fork me on GitHub
#clojure-dev
<
2018-10-30
>
plexus21:10:40

I'm trying to find out how to make some reflection-heavy code compatible with Clojure 1.10. This call to .forEach on an instance of java.util.stream.ReferencePipeline$Head used to work on 1.9, but now the Reflector fails to find a matching method https://github.com/alexander-yakushev/compliment/blob/master/src/compliment/utils.clj#L168 Target its trying to call: https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/999dbd4192d0f819cb5224f26e9e7fa75ca6f289/src/java.base/share/classes/java/util/stream/ReferencePipeline.java#L656

ghadi21:10:09

ReferencePipeline$Head is private

ghadi21:10:27

you want to hint onto the Stream

ghadi21:10:35

(.forEach s (reify Consumer (accept [_ v] ...)))

plexus21:10:01

I'm reading through Reflector.java, trying to understand what it's filtering on. Any tips would be appreciated. Seems before it would just check for arity+method name, but now it's doing a lot of extra stuff