New bugs

andrei.eremeev andrei.eremeev at oracle.com
Tue Mar 3 20:21:03 UTC 2015


Hi REPL team,

1. /c or /classes prints "class" for enums and annotations, while 
"interface" is printed for interfaces.
-> @interface A {}
|  Added annotation interface A

-> /c
|    class A

-> enum A {}
|  Replaced enum A

-> /c
|    class A

-> interface A {}
|  Replaced interface A

-> /c
|    interface A

2. IllegalArgumentException is not thrown when currentDeclaration is 
called on the snippet declared in another state.
See the provided example (The appropriate test will be pushed soon).

SnippetInfo info = assertEval1("class A { void f() {} }");
EvalProcessing evalProcessing = EvalProcessing.create(newTestingInputStream(),
         newPrintStream(newByteArrayOutputStream()),
         newPrintStream(newByteArrayOutputStream()));
try(EvalState state = evalProcessing.evalState()) {
     List<EvalResult> results = state.eval("class A { int f() { return 0; } }");
     assertEquals(results.size(),1,"Too much snippets");
     EvalResult result = results.get(0);
     assertTrue(result.outcome.success,"Compilation failed");
     state.currentResolution(info.key());
}

3. It looks like addToClasspath is broken, REPL cannot find any classes 
added to classpath.

Andrei Eremeev


More information about the kulla-dev mailing list