Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Breaking IntelliJ stream trace
java.lang.IncompatibleClassChangeError: Type StreamTraceTest$GeneratedEvaluationClass$8 is not a nest member of StreamTraceTest: types are in different packages
import org.junit.Test;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class StreamTraceTest {
@Test
public void test() {
AtomicInteger mapCount = new AtomicInteger(0);
String result = Stream.of("red", "green", "blue")
.map(s -> {
mapCount.incrementAndGet();
return s.charAt(0);
})
.map(Object::toString)
.collect(Collectors.joining());
System.out.println("result = " + result);
System.out.println("mapCount = " + mapCount);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.