From seth.lytle at gmail.com Fri Sep 14 05:49:46 2018 From: seth.lytle at gmail.com (seth lytle) Date: Fri, 14 Sep 2018 01:49:46 -0400 Subject: JavaShellToolBuilder lingering daemon threads Message-ID: when running: mvn exec:java -Dexec.mainClass=Kshell with java 9, 10 or 11 with a pom: 4.0.0 test test 1 src 9 9 and source: public class Kshell { public static void main(String[] args) throws Exception { jdk.jshell.tool.JavaShellToolBuilder.builder().run(args); } } maven complains: jshell> /exit | Goodbye [WARNING] thread Thread[Timer-0,5,Kshell] was interrupted but is still alive after waiting at least 15000msecs [WARNING] thread Thread[Timer-0,5,Kshell] will linger despite being asked to die via interruption [WARNING] thread Thread[Thread-2,5,Kshell] will linger despite being asked to die via interruption [WARNING] NOTE: 2 thread(s) did not finish despite being asked to via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied. going through the debugger somewhat it looks like the first is created by Preferences and calling: builder.persistence(new TreeMap()); eliminates this warning (though not if called after the run finishes). the timer is stored in a static field, and due to the module system i don't think i can work around this with classloader magic the second thread appears to be the static field SourceCodeAnalysisImpl.INDEXER, and again, i don't see any cleanup logic workaround: for now i'm calling System.exit(0) From robert.field at oracle.com Fri Sep 14 19:11:44 2018 From: robert.field at oracle.com (Robert Field) Date: Fri, 14 Sep 2018 12:11:44 -0700 Subject: JavaShellToolBuilder lingering daemon threads In-Reply-To: References: Message-ID: Thank you, Seth, for your detailed bug report. I have created: ???? JShell: JavaShellToolBuilder lingering daemon threads ???? https://bugs.openjdk.java.net/browse/JDK-8210767 To track it. Thanks again, Robert On 09/13/18 22:49, seth lytle wrote: > when running: > mvn exec:java -Dexec.mainClass=Kshell > > with java 9, 10 or 11 > > with a pom: > > 4.0.0 > test > test > 1 > > src > > > 9 > 9 > > > > and source: > public class Kshell { > public static void main(String[] args) throws Exception { > jdk.jshell.tool.JavaShellToolBuilder.builder().run(args); > } > } > > maven complains: > jshell> /exit > | Goodbye > [WARNING] thread Thread[Timer-0,5,Kshell] was interrupted but is still > alive after waiting at least 15000msecs > [WARNING] thread Thread[Timer-0,5,Kshell] will linger despite being asked > to die via interruption > [WARNING] thread Thread[Thread-2,5,Kshell] will linger despite being asked > to die via interruption > [WARNING] NOTE: 2 thread(s) did not finish despite being asked to via > interruption. This is not a problem with exec:java, it is a problem with > the running code. Although not serious, it should be remedied. > > > > going through the debugger somewhat it looks like the first is created by > Preferences and calling: > builder.persistence(new TreeMap()); > eliminates this warning (though not if called after the run finishes). the > timer is stored in a static field, and due to the module system i don't > think i can work around this with classloader magic > > the second thread appears to be the static field > SourceCodeAnalysisImpl.INDEXER, and again, i don't see any cleanup logic > > > workaround: > for now i'm calling System.exit(0) From robert.field at oracle.com Sun Sep 16 23:06:07 2018 From: robert.field at oracle.com (Robert Field) Date: Sun, 16 Sep 2018 16:06:07 -0700 Subject: RFR 8210596: jshell does not support raw string literals Message-ID: <7739e047-d3ee-092a-7520-75225640a6aa@oracle.com> Please review fix for: ??? https://bugs.openjdk.java.net/browse/JDK-8210596 Webrev: ??? http://cr.openjdk.java.net/~rfield/8210596v0.webrev/ Note: there were two issues: (1) a logging set-up issue that caused the reported error; and (2) needed handling for multi-line raw strings. Thanks, Robert From jan.lahoda at oracle.com Mon Sep 17 12:28:45 2018 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Mon, 17 Sep 2018 14:28:45 +0200 Subject: RFR 8210596: jshell does not support raw string literals In-Reply-To: <7739e047-d3ee-092a-7520-75225640a6aa@oracle.com> References: <7739e047-d3ee-092a-7520-75225640a6aa@oracle.com> Message-ID: <5B9F9DFD.4070301@oracle.com> Looks good to me. Jan On 17.9.2018 01:06, Robert Field wrote: > Please review fix for: > > https://bugs.openjdk.java.net/browse/JDK-8210596 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8210596v0.webrev/ > > Note: there were two issues: > > (1) a logging set-up issue that caused the reported error; and > > (2) needed handling for multi-line raw strings. > > Thanks, > Robert > > From james.laskey at oracle.com Mon Sep 17 12:02:36 2018 From: james.laskey at oracle.com (Jim Laskey) Date: Mon, 17 Sep 2018 09:02:36 -0300 Subject: RFR 8210596: jshell does not support raw string literals In-Reply-To: <7739e047-d3ee-092a-7520-75225640a6aa@oracle.com> References: <7739e047-d3ee-092a-7520-75225640a6aa@oracle.com> Message-ID: +1 > On Sep 16, 2018, at 8:06 PM, Robert Field wrote: > > Please review fix for: > > https://bugs.openjdk.java.net/browse/JDK-8210596 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8210596v0.webrev/ > > Note: there were two issues: > > (1) a logging set-up issue that caused the reported error; and > > (2) needed handling for multi-line raw strings. > > Thanks, > Robert > > From robert.field at oracle.com Tue Sep 25 22:46:55 2018 From: robert.field at oracle.com (Robert Field) Date: Tue, 25 Sep 2018 15:46:55 -0700 Subject: RFR 8210923: JShell: support for switch expressions Message-ID: <197310d4-eadf-2586-11d4-bbe8298ead04@oracle.com> Please review: Bug: ??? https://bugs.openjdk.java.net/browse/JDK-8210923 Webrev: ??? http://cr.openjdk.java.net/~rfield/8210923v0.webrev/ Thanks, Robert