I'm running against an issue:
I've created this stream I need to map to a Map<String, Object>:
private Map<String, Object> collectArguments(JoinPoint point) {
CodeSignature signature = (CodeSignature) point.getSignature();
String[] argNames = signature.getParameterNames();
Object[] args = point.getArgs();
return IntStream.range(0, args.length)
.collect(Collectors.toMap(param -> argNames[param], param -> args[param]));
}
I'm getting the following message, which I don't quite figure out:
[Java] Type mismatch: cannot convert from Collector<Object,capture#3-of ?,Map<Object,Object>> to Supplier<R>