Open johnnychow1 opened 4 years ago
As you've discovered method refs are not yet supported with extension methods, instead please use lambda expressions for this use-case. Thanks.
similar: https://github.com/manifold-systems/manifold/issues/64
Thanks for the quick responses. Looking forward to see it supported soon :)
Describe the bug Use method reference operator (::) throws ClassCastException
To Reproduce This code works fine:
MyQuery query = MyQuery.builder().build(); MyQuery.Result result = query.request(ENDPOINT).post(); List resultList = result.getGeneratedObjects().stream()
.map(obj->MyDomainObjectMapper.map(obj))
.collect(Collectors.toList());
However code below fails and throws java.lang.ClassCastException: manifold.api.json.DataBindings cannot be cast to queries$MyQuery$Result$generatedObject
MyQuery query = MyQuery.builder().build(); MyQuery.Result result = query.request(ENDPOINT).post(); List resultList = result.getGeneratedObjects().stream()
.map(MyDomainObjectMapper::map)
.collect(Collectors.toList());