java-repl
java-repl copied to clipboard
Anything returning a Stream breaks REPL
It seems that returning a stream into one of the resX variables breaks the REPL.
The following breaks JavaREPL reliably:
Object[] o1 = new Object[1];
o1[0] = "hello"
o1
Object[] o2 = new Object[2];
o2[0] = "world";
o2[1] = "foo"
List<Object[]> l = new ArrayList<>()
l.add(o1)
l.add(o2)
l.stream()
From this point forward, every single command will output the following:
ERROR: package java.util.stream.ReferencePipeline does not exist
public java.util.stream.ReferencePipeline.Head res14 = valueOf("res14");
However, streams themselves seem to be okay. The following works flawlessly:
Object[] o1 = new Object[1];
o1[0] = "hello"
o1
Object[] o2 = new Object[2];
o2[0] = "world";
o2[1] = "foo"
List<Object[]> l = new ArrayList<>()
l.add(o1)
l.add(o2)
l.stream().map(java.util.Arrays::toString).collect(Collectors.toList())
I am using Java 1.8.0_11