Search code examples
javaintellij-ideajava-stream

Internal error when debugging a Java Stream in IntelliJ IDEA


I want to debug the code that uses a stream. When I use stream trace to track the details, an internal error occurs. I am using IntelliJ IDEA 2022.1.

Main code:

String result =
    Stream.of(input.split(""))
        .map(s -> s.charAt(0))
        .sorted()
        .limit(5)
        .map(String::valueOf)
        .collect(joining());
System.out.println(result);

Error: Internal error


Solution

  • This is not an error with your code. I recommend to visit site https://youtrack.jetbrains.com/issues/IDEA and search for issues similar to yours.