RFR 8156101: JShell SPI: Provide a pluggable execution control SPI
Robert Field
robert.field at oracle.com
Sat May 14 03:55:50 UTC 2016
Updated langtools webrev with additional code comments only (to ease
review). No changes to code:
http://cr.openjdk.java.net/~rfield/8156101v2_lang.webrev/
-Robert
On 05/13/2016 12:29 AM, Robert Field wrote:
> Updated langtools webrev:
> http://cr.openjdk.java.net/~rfield/8156101v1_lang.webrev/
>
> -Robert
>
>
> On 05/12/2016 11:41 PM, Robert Field wrote:
>> Attached is a test for this functionality utilizing a local
>> implementation of ExecutionControl courtesy of Grigory Ptashko.
>> Thank you Grigory!
>>
>> All files in test/jdk/jshell.
>>
>> This test needs one method added to KullaTesting --
>>
>> diff -r c51b40933e0c test/jdk/jshell/KullaTesting.java
>> --- a/test/jdk/jshell/KullaTesting.java Wed May 11 20:28:22 2016
>> +0000
>> +++ b/test/jdk/jshell/KullaTesting.java Thu May 12 23:31:14 2016
>> -0700
>> @@ -72,6 +72,7 @@
>> import static jdk.jshell.Snippet.Status.*;
>> import static org.testng.Assert.*;
>> import static jdk.jshell.Snippet.SubKind.METHOD_SUBKIND;
>> +import jdk.jshell.spi.ExecutionControl;
>>
>> public class KullaTesting {
>>
>> @@ -166,6 +167,21 @@
>> classpath = new ArrayList<>();
>> }
>>
>> + public void setUp(ExecutionControl ec) {
>> + inStream = new TestingInputStream();
>> + outStream = new ByteArrayOutputStream();
>> + errStream = new ByteArrayOutputStream();
>> + state = JShell.builder()
>> + .executionEngine(ec)
>> + .in(inStream)
>> + .out(new PrintStream(outStream))
>> + .err(new PrintStream(errStream))
>> + .build();
>> + allSnippets = new LinkedHashSet<>();
>> + idToSnippet = new LinkedHashMap<>();
>> + classpath = new ArrayList<>();
>> + }
>> +
>> @AfterMethod
>> public void tearDown() {
>> if (state != null) state.close();
>>
>>
>> On 05/11/2016 10:53 PM, Robert Field wrote:
>>> Please review the new Service Provider Interface for using alternate
>>> execution implements.
>>>
>>> Bug:
>>> https://bugs.openjdk.java.net/browse/JDK-8156101
>>>
>>> Webrevs:
>>> http://cr.openjdk.java.net/~rfield/8156101v0_lang.webrev/
>>> http://cr.openjdk.java.net/~rfield/8156101v0_ws.webrev/
>>>
>>> Javadoc:
>>> http://cr.openjdk.java.net/~rfield/jshell_spi/
>>>
>>> Note: The SPI is tested since it is used by the default JDI
>>> implementation (which has no special access). However, tests using
>>> an alternative execution engine will be included.
>>>
>>> Thanks,
>>> Robert
>>>
>>
>
More information about the kulla-dev
mailing list