From robert.field at oracle.com Wed May 2 04:38:58 2018 From: robert.field at oracle.com (Robert Field) Date: Tue, 1 May 2018 21:38:58 -0700 Subject: RFR (s) 8202520: JShell tests: move intermittently failing tests to tier2 Message-ID: <7cbfa88a-b1b1-cad8-98cc-2e57a90f7100@oracle.com> Please review. Bug: ??? https://bugs.openjdk.java.net/browse/JDK-8202520 hg diff: diff -r f4310c01104d test/langtools/TEST.groups --- a/test/langtools/TEST.groups??????? Tue May 01 17:28:03 2018 -0700 +++ b/test/langtools/TEST.groups??????? Tue May 01 21:34:50 2018 -0700 @@ -1,4 +1,4 @@ -#? Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. +#? Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. ?#? DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ?# ?#? This code is free software; you can redistribute it and/or modify it @@ -28,14 +28,32 @@ ???? lib \ ???? tools \ ???? -jdk/jshell/ExternalEditorTest.java \ +??? -jdk/jshell/FailOverDirectExecutionControlTest.java \ +??? -jdk/jshell/FailOverExecutionControlDyingLaunchTest.java \ +??? -jdk/jshell/FailOverExecutionControlHangingListenTest.java \ +??? -jdk/jshell/JdiHangingListenExecutionControlTest.java \ +??? -jdk/jshell/JdiLaunchingExecutionControlTest.java \ +??? -jdk/jshell/JdiListeningExecutionControlTest.java \ +??? -jdk/jshell/JdiListeningLocalhostExecutionControlTest.java? \ +??? -jdk/jshell/ToolBasicTest.java \ +??? -jdk/jshell/ToolLocaleMessageTest.java \ ???? -jdk/jshell/ToolReloadTest.java \ -??? -jdk/jshell/ToolLocaleMessageTest.java +??? -jdk/jshell/UserJdiUserRemoteTest.java ?# (Almost) no langtools tests are tier 2. ?tier2 = \ ???? jdk/jshell/ExternalEditorTest.java \ +??? jdk/jshell/FailOverDirectExecutionControlTest.java \ +??? jdk/jshell/FailOverExecutionControlDyingLaunchTest.java \ +??? jdk/jshell/FailOverExecutionControlHangingListenTest.java \ +??? jdk/jshell/JdiHangingListenExecutionControlTest.java \ +??? jdk/jshell/JdiLaunchingExecutionControlTest.java \ +??? jdk/jshell/JdiListeningExecutionControlTest.java \ +??? jdk/jshell/JdiListeningLocalhostExecutionControlTest.java \ +??? jdk/jshell/ToolBasicTest.java \ +??? jdk/jshell/ToolLocaleMessageTest.java \ ???? jdk/jshell/ToolReloadTest.java \ -??? jdk/jshell/ToolLocaleMessageTest.java +??? jdk/jshell/UserJdiUserRemoteTest.java ?# No langtools tests are tier 3 either. ?tier3 = From joe.darcy at oracle.com Wed May 2 17:46:49 2018 From: joe.darcy at oracle.com (joe darcy) Date: Wed, 2 May 2018 10:46:49 -0700 Subject: RFR (s) 8202520: JShell tests: move intermittently failing tests to tier2 In-Reply-To: <7cbfa88a-b1b1-cad8-98cc-2e57a90f7100@oracle.com> References: <7cbfa88a-b1b1-cad8-98cc-2e57a90f7100@oracle.com> Message-ID: Looks fine Robert; thanks, -Joe On 5/1/2018 9:38 PM, Robert Field wrote: > Please review. > > Bug: > > ??? https://bugs.openjdk.java.net/browse/JDK-8202520 > > hg diff: > > > diff -r f4310c01104d test/langtools/TEST.groups > --- a/test/langtools/TEST.groups??????? Tue May 01 17:28:03 2018 -0700 > +++ b/test/langtools/TEST.groups??????? Tue May 01 21:34:50 2018 -0700 > @@ -1,4 +1,4 @@ > -#? Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights > reserved. > +#? Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights > reserved. > ?#? DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ?# > ?#? This code is free software; you can redistribute it and/or modify it > @@ -28,14 +28,32 @@ > ???? lib \ > ???? tools \ > ???? -jdk/jshell/ExternalEditorTest.java \ > +??? -jdk/jshell/FailOverDirectExecutionControlTest.java \ > +??? -jdk/jshell/FailOverExecutionControlDyingLaunchTest.java \ > +??? -jdk/jshell/FailOverExecutionControlHangingListenTest.java \ > +??? -jdk/jshell/JdiHangingListenExecutionControlTest.java \ > +??? -jdk/jshell/JdiLaunchingExecutionControlTest.java \ > +??? -jdk/jshell/JdiListeningExecutionControlTest.java \ > +??? -jdk/jshell/JdiListeningLocalhostExecutionControlTest.java? \ > +??? -jdk/jshell/ToolBasicTest.java \ > +??? -jdk/jshell/ToolLocaleMessageTest.java \ > ???? -jdk/jshell/ToolReloadTest.java \ > -??? -jdk/jshell/ToolLocaleMessageTest.java > +??? -jdk/jshell/UserJdiUserRemoteTest.java > > ?# (Almost) no langtools tests are tier 2. > ?tier2 = \ > ???? jdk/jshell/ExternalEditorTest.java \ > +??? jdk/jshell/FailOverDirectExecutionControlTest.java \ > +??? jdk/jshell/FailOverExecutionControlDyingLaunchTest.java \ > +??? jdk/jshell/FailOverExecutionControlHangingListenTest.java \ > +??? jdk/jshell/JdiHangingListenExecutionControlTest.java \ > +??? jdk/jshell/JdiLaunchingExecutionControlTest.java \ > +??? jdk/jshell/JdiListeningExecutionControlTest.java \ > +??? jdk/jshell/JdiListeningLocalhostExecutionControlTest.java \ > +??? jdk/jshell/ToolBasicTest.java \ > +??? jdk/jshell/ToolLocaleMessageTest.java \ > ???? jdk/jshell/ToolReloadTest.java \ > -??? jdk/jshell/ToolLocaleMessageTest.java > +??? jdk/jshell/UserJdiUserRemoteTest.java > > ?# No langtools tests are tier 3 either. > ?tier3 = > From xu.y.yin at oracle.com Mon May 7 09:25:07 2018 From: xu.y.yin at oracle.com (Chris Yin) Date: Mon, 7 May 2018 17:25:07 +0800 Subject: RFR 8202690: jdk/jshell/ToolBasicTest.java failed in testOpenFileOverHttp() and testOpenLocalFileUrl() Message-ID: Please have a review for below suggested fix for 8202690 to handle windows platform correctly after 8199912, thanks bug: https://bugs.openjdk.java.net/browse/JDK-8202690 Suggested fix as below: diff -r caf05d64138f src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java --- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java Mon May 07 07:44:49 2018 +0530 +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java Mon May 07 17:12:20 2018 +0800 @@ -42,6 +42,7 @@ import java.lang.module.ModuleReference; import java.net.MalformedURLException; import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.nio.charset.Charset; import java.nio.file.FileSystems; @@ -3000,19 +3001,34 @@ regenerateOnDeath = false; scanner = new Scanner(cmdin); } else { - Path path = toPathResolvingUserHome(filename); + Path path = null; + URL url = null; String resource; - if (Files.exists(path)) { + try { + path = toPathResolvingUserHome(filename); + } catch (InvalidPathException ipe) { + try { + url = new URL(filename); + if (url.getProtocol().equalsIgnoreCase("file")) { + path = Paths.get(url.toURI()); + } + } catch (MalformedURLException | URISyntaxException e) { + throw new FileNotFoundException(filename); + } + } + if (path != null && Files.exists(path)) { scanner = new Scanner(new FileReader(path.toString())); } else if ((resource = getResource(filename)) != null) { scanner = new Scanner(new StringReader(resource)); } else { - try { - var url = new URL(filename); - scanner = new Scanner(url.openStream()); - } catch (MalformedURLException mue) { - throw new FileNotFoundException(filename); + if (url == null) { + try { + url = new URL(filename); + } catch (MalformedURLException mue) { + throw new FileNotFoundException(filename); + } } + scanner = new Scanner(url.openStream()); } } try (var scannerIOContext = new ScannerIOContext(scanner)) { diff -r caf05d64138f test/langtools/jdk/jshell/ToolBasicTest.java --- a/test/langtools/jdk/jshell/ToolBasicTest.java Mon May 07 07:44:49 2018 +0530 +++ b/test/langtools/jdk/jshell/ToolBasicTest.java Mon May 07 17:12:20 2018 +0800 @@ -501,7 +501,7 @@ compiler.writeToFile(path, "int a = 10;int b = 20;int c = a + b;\n"); for (String s : new String[]{"/o", "/open"}) { test( - (a) -> assertCommand(a, s + " file://" + path.toString(), ""), + (a) -> assertCommand(a, s + " " + path.toUri(), ""), (a) -> assertCommand(a, "a", "a ==> 10"), (a) -> assertCommand(a, "b", "b ==> 20"), (a) -> assertCommand(a, "c", "c ==> 30") Regards, Chris From robert.field at oracle.com Mon May 7 15:35:41 2018 From: robert.field at oracle.com (Robert Field) Date: Mon, 7 May 2018 08:35:41 -0700 Subject: RFR 8202690: jdk/jshell/ToolBasicTest.java failed in testOpenFileOverHttp() and testOpenLocalFileUrl() In-Reply-To: References: Message-ID: <769ff7d8-1f15-1534-579a-20f401d310e9@oracle.com> Thanks Chris! For those that like to see webrevs, here is one for Chris' change: ???? http://cr.openjdk.java.net/~rfield/8202690v0.webrev/ -Robert On 05/07/18 02:25, Chris Yin wrote: > Please have a review for below suggested fix for 8202690 to handle > windows platform correctly after 8199912, thanks > > bug: https://bugs.openjdk.java.net/browse/JDK-8202690 > > Suggested fix as below: > > diff -r caf05d64138f > src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java > --- > a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.javaMon > May 07 07:44:49 2018 +0530 > +++ > b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.javaMon > May 07 17:12:20 2018 +0800 > @@ -42,6 +42,7 @@ > ?import java.lang.module.ModuleReference; > ?import java.net.MalformedURLException; > ?import java.net.URI; > +import java.net.URISyntaxException; > ?import java.net.URL; > ?import java.nio.charset.Charset; > ?import java.nio.file.FileSystems; > @@ -3000,19 +3001,34 @@ > ? ? ? ? ? ? ? ? ? ? ?regenerateOnDeath = false; > ? ? ? ? ? ? ? ? ? ? ?scanner = new Scanner(cmdin); > ? ? ? ? ? ? ? ? ?} else { > - ? ? ? ? ? ? ? ? ? ?Path path = toPathResolvingUserHome(filename); > + ? ? ? ? ? ? ? ? ? ?Path path = null; > + ? ? ? ? ? ? ? ? ? ?URL url = null; > ? ? ? ? ? ? ? ? ? ? ?String resource; > - ? ? ? ? ? ? ? ? ? ?if (Files.exists(path)) { > + ? ? ? ? ? ? ? ? ? ?try { > + ? ? ? ? ? ? ? ? ? ? ? ?path = toPathResolvingUserHome(filename); > + ? ? ? ? ? ? ? ? ? ?} catch (InvalidPathException ipe) { > + ? ? ? ? ? ? ? ? ? ? ? ?try { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?url = new URL(filename); > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?if > (url.getProtocol().equalsIgnoreCase("file")) { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?path = Paths.get(url.toURI()); > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > + ? ? ? ? ? ? ? ? ? ? ? ?} catch (MalformedURLException | > URISyntaxException e) { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?throw new FileNotFoundException(filename); > + ? ? ? ? ? ? ? ? ? ? ? ?} > + ? ? ? ? ? ? ? ? ? ?} > + ? ? ? ? ? ? ? ? ? ?if (path != null && Files.exists(path)) { > ? ? ? ? ? ? ? ? ? ? ? ? ?scanner = new Scanner(new > FileReader(path.toString())); > ? ? ? ? ? ? ? ? ? ? ?} else if ((resource = getResource(filename)) != > null) { > ? ? ? ? ? ? ? ? ? ? ? ? ?scanner = new Scanner(new > StringReader(resource)); > ? ? ? ? ? ? ? ? ? ? ?} else { > - ? ? ? ? ? ? ? ? ? ? ? ?try { > - ? ? ? ? ? ? ? ? ? ? ? ? ? ?var url = new URL(filename); > - ? ? ? ? ? ? ? ? ? ? ? ? ? ?scanner = new Scanner(url.openStream()); > - ? ? ? ? ? ? ? ? ? ? ? ?} catch (MalformedURLException mue) { > - ? ? ? ? ? ? ? ? ? ? ? ? ? ?throw new FileNotFoundException(filename); > + ? ? ? ? ? ? ? ? ? ? ? ?if (url == null) { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?try { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?url = new URL(filename); > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?} catch (MalformedURLException mue) { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?throw new > FileNotFoundException(filename); > + ? ? ? ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ? ? ? ? ?} > + ? ? ? ? ? ? ? ? ? ? ? ?scanner = new Scanner(url.openStream()); > ? ? ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ?} > ? ? ? ? ? ? ? ? ?try (var scannerIOContext = new > ScannerIOContext(scanner)) { > diff -r caf05d64138f test/langtools/jdk/jshell/ToolBasicTest.java > --- a/test/langtools/jdk/jshell/ToolBasicTest.javaMon May 07 07:44:49 > 2018 +0530 > +++ b/test/langtools/jdk/jshell/ToolBasicTest.javaMon May 07 17:12:20 > 2018 +0800 > @@ -501,7 +501,7 @@ > ? ? ? ? ?compiler.writeToFile(path, "int a = 10;int b = 20;int c = a + > b;\n"); > ? ? ? ? ?for (String s : new String[]{"/o", "/open"}) { > ? ? ? ? ? ? ?test( > - ? ? ? ? ? ? ? ? ? ?(a) -> assertCommand(a, s + " file://" + > path.toString(), ""), > + ? ? ? ? ? ? ? ? ? ?(a) -> assertCommand(a, s + " " + path.toUri(), ""), > ? ? ? ? ? ? ? ? ? ? ?(a) -> assertCommand(a, "a", "a ==> 10"), > ? ? ? ? ? ? ? ? ? ? ?(a) -> assertCommand(a, "b", "b ==> 20"), > ? ? ? ? ? ? ? ? ? ? ?(a) -> assertCommand(a, "c", "c ==> 30") > > > Regards, > Chris From jan.lahoda at oracle.com Mon May 7 15:44:46 2018 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Mon, 7 May 2018 17:44:46 +0200 Subject: RFR 8202690: jdk/jshell/ToolBasicTest.java failed in testOpenFileOverHttp() and testOpenLocalFileUrl() In-Reply-To: <769ff7d8-1f15-1534-579a-20f401d310e9@oracle.com> References: <769ff7d8-1f15-1534-579a-20f401d310e9@oracle.com> Message-ID: <5AF0746E.9060601@oracle.com> Looks OK to me. Jan On 7.5.2018 17:35, Robert Field wrote: > Thanks Chris! > > For those that like to see webrevs, here is one for Chris' change: > > http://cr.openjdk.java.net/~rfield/8202690v0.webrev/ > > -Robert > > > > On 05/07/18 02:25, Chris Yin wrote: >> Please have a review for below suggested fix for 8202690 to handle >> windows platform correctly after 8199912, thanks >> >> bug: https://bugs.openjdk.java.net/browse/JDK-8202690 >> >> Suggested fix as below: >> >> diff -r caf05d64138f >> src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java >> --- >> a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.javaMon >> May 07 07:44:49 2018 +0530 >> +++ >> b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.javaMon >> May 07 17:12:20 2018 +0800 >> @@ -42,6 +42,7 @@ >> import java.lang.module.ModuleReference; >> import java.net.MalformedURLException; >> import java.net.URI; >> +import java.net.URISyntaxException; >> import java.net.URL; >> import java.nio.charset.Charset; >> import java.nio.file.FileSystems; >> @@ -3000,19 +3001,34 @@ >> regenerateOnDeath = false; >> scanner = new Scanner(cmdin); >> } else { >> - Path path = toPathResolvingUserHome(filename); >> + Path path = null; >> + URL url = null; >> String resource; >> - if (Files.exists(path)) { >> + try { >> + path = toPathResolvingUserHome(filename); >> + } catch (InvalidPathException ipe) { >> + try { >> + url = new URL(filename); >> + if >> (url.getProtocol().equalsIgnoreCase("file")) { >> + path = Paths.get(url.toURI()); >> + } >> + } catch (MalformedURLException | >> URISyntaxException e) { >> + throw new FileNotFoundException(filename); >> + } >> + } >> + if (path != null && Files.exists(path)) { >> scanner = new Scanner(new >> FileReader(path.toString())); >> } else if ((resource = getResource(filename)) != >> null) { >> scanner = new Scanner(new >> StringReader(resource)); >> } else { >> - try { >> - var url = new URL(filename); >> - scanner = new Scanner(url.openStream()); >> - } catch (MalformedURLException mue) { >> - throw new FileNotFoundException(filename); >> + if (url == null) { >> + try { >> + url = new URL(filename); >> + } catch (MalformedURLException mue) { >> + throw new >> FileNotFoundException(filename); >> + } >> } >> + scanner = new Scanner(url.openStream()); >> } >> } >> try (var scannerIOContext = new >> ScannerIOContext(scanner)) { >> diff -r caf05d64138f test/langtools/jdk/jshell/ToolBasicTest.java >> --- a/test/langtools/jdk/jshell/ToolBasicTest.javaMon May 07 07:44:49 >> 2018 +0530 >> +++ b/test/langtools/jdk/jshell/ToolBasicTest.javaMon May 07 17:12:20 >> 2018 +0800 >> @@ -501,7 +501,7 @@ >> compiler.writeToFile(path, "int a = 10;int b = 20;int c = a + >> b;\n"); >> for (String s : new String[]{"/o", "/open"}) { >> test( >> - (a) -> assertCommand(a, s + " file://" + >> path.toString(), ""), >> + (a) -> assertCommand(a, s + " " + path.toUri(), ""), >> (a) -> assertCommand(a, "a", "a ==> 10"), >> (a) -> assertCommand(a, "b", "b ==> 20"), >> (a) -> assertCommand(a, "c", "c ==> 30") >> >> >> Regards, >> Chris > From xu.y.yin at oracle.com Tue May 8 04:57:01 2018 From: xu.y.yin at oracle.com (Chris Yin) Date: Tue, 8 May 2018 12:57:01 +0800 Subject: RFR 8202690: jdk/jshell/ToolBasicTest.java failed in testOpenFileOverHttp() and testOpenLocalFileUrl() In-Reply-To: <5AF0746E.9060601@oracle.com> References: <769ff7d8-1f15-1534-579a-20f401d310e9@oracle.com> <5AF0746E.9060601@oracle.com> Message-ID: Thank you Jan & Robert Regards, Chris > On 7 May 2018, at 11:44 PM, Jan Lahoda wrote: > > Looks OK to me. > > Jan > > On 7.5.2018 17:35, Robert Field wrote: >> Thanks Chris! >> >> For those that like to see webrevs, here is one for Chris' change: >> >> http://cr.openjdk.java.net/~rfield/8202690v0.webrev/ >> >> -Robert >> >> >> >> On 05/07/18 02:25, Chris Yin wrote: >>> Please have a review for below suggested fix for 8202690 to handle >>> windows platform correctly after 8199912, thanks >>> >>> bug: https://bugs.openjdk.java.net/browse/JDK-8202690 >>> >>> Suggested fix as below: >>> >>> diff -r caf05d64138f >>> src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.javaMon >>> May 07 07:44:49 2018 +0530 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.javaMon >>> May 07 17:12:20 2018 +0800 >>> @@ -42,6 +42,7 @@ >>> import java.lang.module.ModuleReference; >>> import java.net.MalformedURLException; >>> import java.net.URI; >>> +import java.net.URISyntaxException; >>> import java.net.URL; >>> import java.nio.charset.Charset; >>> import java.nio.file.FileSystems; >>> @@ -3000,19 +3001,34 @@ >>> regenerateOnDeath = false; >>> scanner = new Scanner(cmdin); >>> } else { >>> - Path path = toPathResolvingUserHome(filename); >>> + Path path = null; >>> + URL url = null; >>> String resource; >>> - if (Files.exists(path)) { >>> + try { >>> + path = toPathResolvingUserHome(filename); >>> + } catch (InvalidPathException ipe) { >>> + try { >>> + url = new URL(filename); >>> + if >>> (url.getProtocol().equalsIgnoreCase("file")) { >>> + path = Paths.get(url.toURI()); >>> + } >>> + } catch (MalformedURLException | >>> URISyntaxException e) { >>> + throw new FileNotFoundException(filename); >>> + } >>> + } >>> + if (path != null && Files.exists(path)) { >>> scanner = new Scanner(new >>> FileReader(path.toString())); >>> } else if ((resource = getResource(filename)) != >>> null) { >>> scanner = new Scanner(new >>> StringReader(resource)); >>> } else { >>> - try { >>> - var url = new URL(filename); >>> - scanner = new Scanner(url.openStream()); >>> - } catch (MalformedURLException mue) { >>> - throw new FileNotFoundException(filename); >>> + if (url == null) { >>> + try { >>> + url = new URL(filename); >>> + } catch (MalformedURLException mue) { >>> + throw new >>> FileNotFoundException(filename); >>> + } >>> } >>> + scanner = new Scanner(url.openStream()); >>> } >>> } >>> try (var scannerIOContext = new >>> ScannerIOContext(scanner)) { >>> diff -r caf05d64138f test/langtools/jdk/jshell/ToolBasicTest.java >>> --- a/test/langtools/jdk/jshell/ToolBasicTest.javaMon May 07 07:44:49 >>> 2018 +0530 >>> +++ b/test/langtools/jdk/jshell/ToolBasicTest.javaMon May 07 17:12:20 >>> 2018 +0800 >>> @@ -501,7 +501,7 @@ >>> compiler.writeToFile(path, "int a = 10;int b = 20;int c = a + >>> b;\n"); >>> for (String s : new String[]{"/o", "/open"}) { >>> test( >>> - (a) -> assertCommand(a, s + " file://" + >>> path.toString(), ""), >>> + (a) -> assertCommand(a, s + " " + path.toUri(), ""), >>> (a) -> assertCommand(a, "a", "a ==> 10"), >>> (a) -> assertCommand(a, "b", "b ==> 20"), >>> (a) -> assertCommand(a, "c", "c ==> 30") >>> >>> >>> Regards, >>> Chris >> From sormuras at gmail.com Thu May 10 20:02:41 2018 From: sormuras at gmail.com (Christian Stein) Date: Thu, 10 May 2018 20:02:41 +0000 Subject: 8199912: jshell tool: /open from URI In-Reply-To: References: Message-ID: ...[+13] it is! And it opens like a charm: /open https://github.com/sormuras/bach/raw/master/src/bach/Bach.java /open https://github.com/sormuras/bach/raw/master/src/bach/Bach.jsh var code = java("--version") /exit code [+13] https://download.java.net/java/early_access/jdk11/13/jdk-11+13.html On Mon, Apr 30, 2018 at 8:50 PM Christian Stein wrote: > Looks still good to me. > > Looking forward to jdk-11-ea+12 or ...+13 then. :) > > On Mon, Apr 30, 2018 at 8:45 PM Robert Field > wrote: > >> Please review the following, contributed by: >> >> Michal Vala >> >> Thank you Christian Stein for your comments. >> >> >> Bug: >> >> https://bugs.openjdk.java.net/browse/JDK-8199912 >> >> Webrev: >> >> http://cr.openjdk.java.net/~rfield/8199912v1.webrev/ >> >> >> -Robert >> >> >> From jan.lahoda at oracle.com Fri May 25 20:20:34 2018 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Fri, 25 May 2018 22:20:34 +0200 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 Message-ID: <5B087012.5090409@oracle.com> Hi, I'd like to upgrade the JLine used by JShell and jjs from 2.12.1 to 2.14.6. The complete webrev is here: http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/complete/ To simplify reviewing, there is: -an antipatch that removes the JDK-specific changes and restores the vanilla 2.12.1 content: http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/undo-jdk-extras/ -a patch that replaces the 2.12.1 content with 2.14.6: http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/upgrade-jline/ -a patch that re-applies the JDK-specific changes (like including adjusting packages, and removal/commenting out of usage of features that would require undesirable dependencies, and any changes that had to be done to other modules): http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/adding-jdk-extras/ JBS entry: https://bugs.openjdk.java.net/browse/JDK-8203827 How does this look? Thanks, Jan From robert.field at oracle.com Mon May 28 21:51:51 2018 From: robert.field at oracle.com (Robert Field) Date: Mon, 28 May 2018 14:51:51 -0700 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 In-Reply-To: <5B087012.5090409@oracle.com> References: <5B087012.5090409@oracle.com> Message-ID: <377fb09a-582d-5c3c-b923-2989779f5be3@oracle.com> I've been working on reviewing this. To the extent I can tell, it looks fine. But, Ugh! Untangling what came from where is painful. There is a reason that internal deltas to external packages is considered a nightmare. It would be good to reconsider how we handle this in the future. To the extent we can contribute fixes and additions to jline, that would be a win-win: others would be interested in usage with constrained native library access, and simple fixes, like the @SuppressWarnings additions, etc... Maybe a radical thought, with (internal) modules, is there still a need to do package renaming?? Doing so creates most of the noise. -Robert On 05/25/18 13:20, Jan Lahoda wrote: > Hi, > > I'd like to upgrade the JLine used by JShell and jjs from 2.12.1 to > 2.14.6. > > The complete webrev is here: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/complete/ > > To simplify reviewing, there is: > -an antipatch that removes the JDK-specific changes and restores the > vanilla 2.12.1 content: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/undo-jdk-extras/ > -a patch that replaces the 2.12.1 content with 2.14.6: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/upgrade-jline/ > -a patch that re-applies the JDK-specific changes (like including > adjusting packages, and removal/commenting out of usage of features > that would require undesirable dependencies, and any changes that had > to be done to other modules): > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/adding-jdk-extras/ > > JBS entry: https://bugs.openjdk.java.net/browse/JDK-8203827 > > How does this look? > > Thanks, > ??? Jan From Alan.Bateman at oracle.com Tue May 29 12:51:31 2018 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Tue, 29 May 2018 13:51:31 +0100 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 In-Reply-To: <5B087012.5090409@oracle.com> References: <5B087012.5090409@oracle.com> Message-ID: <4fda3f56-5d17-c61f-241e-532aaefe4577@oracle.com> On 25/05/2018 21:20, Jan Lahoda wrote: > Hi, > > I'd like to upgrade the JLine used by JShell and jjs from 2.12.1 to > 2.14.6. > > The complete webrev is here: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/complete/ > > To simplify reviewing, there is: > -an antipatch that removes the JDK-specific changes and restores the > vanilla 2.12.1 content: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/undo-jdk-extras/ > -a patch that replaces the 2.12.1 content with 2.14.6: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/upgrade-jline/ > -a patch that re-applies the JDK-specific changes (like including > adjusting packages, and removal/commenting out of usage of features > that would require undesirable dependencies, and any changes that had > to be done to other modules): > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/adding-jdk-extras/ > > JBS entry: https://bugs.openjdk.java.net/browse/JDK-8203827 > > How does this look? The refresh looks okay and I see the package name has been adjusted for the new files. Is there an update to src/jdk.internal.le/share/legal/jlink.md? Minimally I would assume the version at the top of the file needs to be updated. -Alan From jan.lahoda at oracle.com Tue May 29 14:01:05 2018 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Tue, 29 May 2018 16:01:05 +0200 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 In-Reply-To: <377fb09a-582d-5c3c-b923-2989779f5be3@oracle.com> References: <5B087012.5090409@oracle.com> <377fb09a-582d-5c3c-b923-2989779f5be3@oracle.com> Message-ID: <5B0D5D21.3020102@oracle.com> On 28.5.2018 23:51, Robert Field wrote: > I've been working on reviewing this. > > To the extent I can tell, it looks fine. Thanks! > > But, Ugh! Untangling what came from where is painful. > > There is a reason that internal deltas to external packages is > considered a nightmare. > > It would be good to reconsider how we handle this in the future. > > To the extent we can contribute fixes and additions to jline, that would > be a win-win: others would be interested in usage with constrained > native library access, and simple fixes, like the @SuppressWarnings > additions, etc... I'll see what can be done. Thanks, Jan > > Maybe a radical thought, with (internal) modules, is there still a need > to do package renaming? Doing so creates most of the noise. > > -Robert > > > > On 05/25/18 13:20, Jan Lahoda wrote: >> Hi, >> >> I'd like to upgrade the JLine used by JShell and jjs from 2.12.1 to >> 2.14.6. >> >> The complete webrev is here: >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/complete/ >> >> To simplify reviewing, there is: >> -an antipatch that removes the JDK-specific changes and restores the >> vanilla 2.12.1 content: >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/undo-jdk-extras/ >> -a patch that replaces the 2.12.1 content with 2.14.6: >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/upgrade-jline/ >> -a patch that re-applies the JDK-specific changes (like including >> adjusting packages, and removal/commenting out of usage of features >> that would require undesirable dependencies, and any changes that had >> to be done to other modules): >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/adding-jdk-extras/ >> >> JBS entry: https://bugs.openjdk.java.net/browse/JDK-8203827 >> >> How does this look? >> >> Thanks, >> Jan > From jan.lahoda at oracle.com Tue May 29 14:04:54 2018 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Tue, 29 May 2018 16:04:54 +0200 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 In-Reply-To: <4fda3f56-5d17-c61f-241e-532aaefe4577@oracle.com> References: <5B087012.5090409@oracle.com> <4fda3f56-5d17-c61f-241e-532aaefe4577@oracle.com> Message-ID: <5B0D5E06.5070806@oracle.com> Hi, On 29.5.2018 14:51, Alan Bateman wrote: > On 25/05/2018 21:20, Jan Lahoda wrote: >> Hi, >> >> I'd like to upgrade the JLine used by JShell and jjs from 2.12.1 to >> 2.14.6. >> >> The complete webrev is here: >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/complete/ >> >> To simplify reviewing, there is: >> -an antipatch that removes the JDK-specific changes and restores the >> vanilla 2.12.1 content: >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/undo-jdk-extras/ >> -a patch that replaces the 2.12.1 content with 2.14.6: >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/upgrade-jline/ >> -a patch that re-applies the JDK-specific changes (like including >> adjusting packages, and removal/commenting out of usage of features >> that would require undesirable dependencies, and any changes that had >> to be done to other modules): >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/adding-jdk-extras/ >> >> JBS entry: https://bugs.openjdk.java.net/browse/JDK-8203827 >> >> How does this look? > The refresh looks okay and I see the package name has been adjusted for > the new files. Thanks. > > Is there an update to src/jdk.internal.le/share/legal/jlink.md? > Minimally I would assume the version at the top of the file needs to be > updated. Yes, it should, I forgot to do that. I'll send an update later. Jan > > -Alan From hannes.wallnoefer at oracle.com Tue May 29 15:32:17 2018 From: hannes.wallnoefer at oracle.com (=?utf-8?Q?Hannes_Walln=C3=B6fer?=) Date: Tue, 29 May 2018 17:32:17 +0200 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 In-Reply-To: <5B087012.5090409@oracle.com> References: <5B087012.5090409@oracle.com> Message-ID: <84F8628B-FFC5-44DF-8FA3-2ABEC97829D9@oracle.com> Hi Jan, Nashorn changes look good. I noticed one slight change of behaviour in jjs. When I enter ?java.m? and hit the tab key, it autocompletes to ?java.math ?, adding a space character at the end. This is a bit inconvenient, and the old version of jline didn?t do that. Hannes > Am 25.05.2018 um 22:20 schrieb Jan Lahoda : > > Hi, > > I'd like to upgrade the JLine used by JShell and jjs from 2.12.1 to 2.14.6. > > The complete webrev is here: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/complete/ > > To simplify reviewing, there is: > -an antipatch that removes the JDK-specific changes and restores the vanilla 2.12.1 content: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/undo-jdk-extras/ > -a patch that replaces the 2.12.1 content with 2.14.6: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/upgrade-jline/ > -a patch that re-applies the JDK-specific changes (like including adjusting packages, and removal/commenting out of usage of features that would require undesirable dependencies, and any changes that had to be done to other modules): > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/adding-jdk-extras/ > > JBS entry: https://bugs.openjdk.java.net/browse/JDK-8203827 > > How does this look? > > Thanks, > Jan From jan.lahoda at oracle.com Tue May 29 16:11:55 2018 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Tue, 29 May 2018 18:11:55 +0200 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 In-Reply-To: <84F8628B-FFC5-44DF-8FA3-2ABEC97829D9@oracle.com> References: <5B087012.5090409@oracle.com> <84F8628B-FFC5-44DF-8FA3-2ABEC97829D9@oracle.com> Message-ID: <5B0D7BCB.8010003@oracle.com> Hi Hannes, On 29.5.2018 17:32, Hannes Walln?fer wrote: > Hi Jan, > > Nashorn changes look good. > > I noticed one slight change of behaviour in jjs. When I enter ?java.m? and hit the tab key, it autocompletes to ?java.math ?, adding a space character at the end. This is a bit inconvenient, and the old version of jline didn?t do that. Thanks for finding that, and sorry I didn't notice (jshell is using its own completion handler, so did not suffer from this). It should be possible to disable this in jjs, will do and will send updated webrev. Thanks, Jan > > Hannes > > >> Am 25.05.2018 um 22:20 schrieb Jan Lahoda : >> >> Hi, >> >> I'd like to upgrade the JLine used by JShell and jjs from 2.12.1 to 2.14.6. >> >> The complete webrev is here: >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/complete/ >> >> To simplify reviewing, there is: >> -an antipatch that removes the JDK-specific changes and restores the vanilla 2.12.1 content: >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/undo-jdk-extras/ >> -a patch that replaces the 2.12.1 content with 2.14.6: >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/upgrade-jline/ >> -a patch that re-applies the JDK-specific changes (like including adjusting packages, and removal/commenting out of usage of features that would require undesirable dependencies, and any changes that had to be done to other modules): >> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/adding-jdk-extras/ >> >> JBS entry: https://bugs.openjdk.java.net/browse/JDK-8203827 >> >> How does this look? >> >> Thanks, >> Jan > From jan.lahoda at oracle.com Wed May 30 15:06:48 2018 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Wed, 30 May 2018 17:06:48 +0200 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 In-Reply-To: <5B0D5E06.5070806@oracle.com> References: <5B087012.5090409@oracle.com> <4fda3f56-5d17-c61f-241e-532aaefe4577@oracle.com> <5B0D5E06.5070806@oracle.com> Message-ID: <5B0EBE08.6010603@oracle.com> Hi, An updated webrev is here: http://cr.openjdk.java.net/~jlahoda/8203827/webrev.01/complete/ A webrev showing changes from the previous revision is here: http://cr.openjdk.java.net/~jlahoda/8203827/webrev.01/delta/ The changes are: -updated src/jdk.internal.le/share/legal/jline.md -the problem with automatically adding space after completion is resolved -a few tweaks to tests Does this look good? Thanks, Jan On 29.5.2018 16:04, Jan Lahoda wrote: > Hi, > > On 29.5.2018 14:51, Alan Bateman wrote: >> On 25/05/2018 21:20, Jan Lahoda wrote: >>> Hi, >>> >>> I'd like to upgrade the JLine used by JShell and jjs from 2.12.1 to >>> 2.14.6. >>> >>> The complete webrev is here: >>> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/complete/ >>> >>> To simplify reviewing, there is: >>> -an antipatch that removes the JDK-specific changes and restores the >>> vanilla 2.12.1 content: >>> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/undo-jdk-extras/ >>> -a patch that replaces the 2.12.1 content with 2.14.6: >>> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/upgrade-jline/ >>> -a patch that re-applies the JDK-specific changes (like including >>> adjusting packages, and removal/commenting out of usage of features >>> that would require undesirable dependencies, and any changes that had >>> to be done to other modules): >>> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/adding-jdk-extras/ >>> >>> JBS entry: https://bugs.openjdk.java.net/browse/JDK-8203827 >>> >>> How does this look? >> The refresh looks okay and I see the package name has been adjusted for >> the new files. > > Thanks. > >> >> Is there an update to src/jdk.internal.le/share/legal/jlink.md? >> Minimally I would assume the version at the top of the file needs to be >> updated. > > Yes, it should, I forgot to do that. I'll send an update later. > > Jan > >> >> -Alan From hannes.wallnoefer at oracle.com Thu May 31 07:26:08 2018 From: hannes.wallnoefer at oracle.com (=?utf-8?Q?Hannes_Walln=C3=B6fer?=) Date: Thu, 31 May 2018 09:26:08 +0200 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 In-Reply-To: <5B0EBE08.6010603@oracle.com> References: <5B087012.5090409@oracle.com> <4fda3f56-5d17-c61f-241e-532aaefe4577@oracle.com> <5B0D5E06.5070806@oracle.com> <5B0EBE08.6010603@oracle.com> Message-ID: Hi Jan, Works as expected with jjs now. Thanks, Hannes > Am 30.05.2018 um 17:06 schrieb Jan Lahoda : > > Hi, > > An updated webrev is here: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.01/complete/ > > A webrev showing changes from the previous revision is here: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.01/delta/ > > The changes are: > -updated src/jdk.internal.le/share/legal/jline.md > -the problem with automatically adding space after completion is resolved > -a few tweaks to tests > > Does this look good? > > Thanks, > Jan > > On 29.5.2018 16:04, Jan Lahoda wrote: >> Hi, >> >> On 29.5.2018 14:51, Alan Bateman wrote: >>> On 25/05/2018 21:20, Jan Lahoda wrote: >>>> Hi, >>>> >>>> I'd like to upgrade the JLine used by JShell and jjs from 2.12.1 to >>>> 2.14.6. >>>> >>>> The complete webrev is here: >>>> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/complete/ >>>> >>>> To simplify reviewing, there is: >>>> -an antipatch that removes the JDK-specific changes and restores the >>>> vanilla 2.12.1 content: >>>> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/undo-jdk-extras/ >>>> -a patch that replaces the 2.12.1 content with 2.14.6: >>>> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/upgrade-jline/ >>>> -a patch that re-applies the JDK-specific changes (like including >>>> adjusting packages, and removal/commenting out of usage of features >>>> that would require undesirable dependencies, and any changes that had >>>> to be done to other modules): >>>> http://cr.openjdk.java.net/~jlahoda/8203827/webrev.00/adding-jdk-extras/ >>>> >>>> JBS entry: https://bugs.openjdk.java.net/browse/JDK-8203827 >>>> >>>> How does this look? >>> The refresh looks okay and I see the package name has been adjusted for >>> the new files. >> >> Thanks. >> >>> >>> Is there an update to src/jdk.internal.le/share/legal/jlink.md? >>> Minimally I would assume the version at the top of the file needs to be >>> updated. >> >> Yes, it should, I forgot to do that. I'll send an update later. >> >> Jan >> >>> >>> -Alan From Alan.Bateman at oracle.com Thu May 31 07:50:51 2018 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 31 May 2018 08:50:51 +0100 Subject: RFR: JDK-8203827: Upgrade JLine to 2.14.6 In-Reply-To: <5B0EBE08.6010603@oracle.com> References: <5B087012.5090409@oracle.com> <4fda3f56-5d17-c61f-241e-532aaefe4577@oracle.com> <5B0D5E06.5070806@oracle.com> <5B0EBE08.6010603@oracle.com> Message-ID: <4d128d6e-ec84-b8bf-c035-a5e30ca4c732@oracle.com> On 30/05/2018 16:06, Jan Lahoda wrote: > Hi, > > An updated webrev is here: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.01/complete/ > > A webrev showing changes from the previous revision is here: > http://cr.openjdk.java.net/~jlahoda/8203827/webrev.01/delta/ > > The changes are: > -updated src/jdk.internal.le/share/legal/jline.md > -the problem with automatically adding space after completion is resolved > -a few tweaks to tests > > Does this look good? I see Hannes has replied and I assume you've tested jshell so I think this is upgrade is good to go. -Alan. From jan.lahoda at oracle.com Thu May 31 09:11:19 2018 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Thu, 31 May 2018 11:11:19 +0200 Subject: RFR: JDK-8203891: Upgrade JOpt Simple to 5.0.4 Message-ID: <5B0FBC37.2090103@oracle.com> Hi, I'd like to upgrade the JOpt Simple library we are using to version 5.0.4. Bug: https://bugs.openjdk.java.net/browse/JDK-8203891 Complete webrev: http://cr.openjdk.java.net/~jlahoda/8203891/webrev.00/complete/ Delta webrev only showing (all) JDK changes in JOpt Simple and related changes in tests needed for the upgrade, etc.: http://cr.openjdk.java.net/~jlahoda/8203891/webrev.00/joptsimple.delta/ Probably the biggest issue with this upgrade is that for two subsequent parameters: "--libs=", "/tmp" "/tmp" used to be interpreted as the parameter of "libs", but now the "libs" parameter is empty (as there's nothing behind the '='). See the changes to test/jdk/tools/jmod/JmodTest.java for an example. Hopefully, this is a reasonable change. How does this look? Thanks, Jan