I have this code:
import java.util.List;
public class Main {
public static void main(String[] args) {
var first = List.of("a", "b", "c").stream().map(String::length).findFirst();
System.out.print(first);
}
}
When I run normally, this work very well, but when I run with debug and evaluate the expression:
List.of("a", "b", "c").stream().map(String::length).findFirst();
I receives the message "Method reference evaluation is not supported".
When I run the same code with explicit inference type, the evaluation work normally.
import java.util.List;
public class Main {
public static void main(String[] args) {
Optional<?> first = List.of("a", "b", "c").stream().map(String::length).findFirst();
System.out.print(first);
}
}
This is a bug or exists some configuration?