From robert.field at oracle.com Wed Feb 1 05:58:02 2017 From: robert.field at oracle.com (Robert Field) Date: Tue, 31 Jan 2017 21:58:02 -0800 Subject: RFR 8173577: JShell tests: Some testng tests check nothing Message-ID: <589178EA.7000707@oracle.com> Well, indeed they didn't, caused by switches between class-level and method-level @Test tags. That was easy to fix. But then, when the tests ran, they failed. A little fix to test infrastructure, a little fix to launching code, ... Please review -- Bug: https://bugs.openjdk.java.net/browse/JDK-8173577 Webrev: http://cr.openjdk.java.net/~rfield/8173577v0.webrev/ Thanks, Robert From jan.lahoda at oracle.com Wed Feb 1 14:44:18 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Wed, 1 Feb 2017 15:44:18 +0100 Subject: RFR 8173577: JShell tests: Some testng tests check nothing In-Reply-To: <589178EA.7000707@oracle.com> References: <589178EA.7000707@oracle.com> Message-ID: <5891F442.10709@oracle.com> Seems fine to me. Jan On 1.2.2017 06:58, Robert Field wrote: > Well, indeed they didn't, caused by switches between class-level and > method-level @Test tags. > That was easy to fix. > But then, when the tests ran, they failed. A little fix to test > infrastructure, a little fix to launching code, ... > Please review -- > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8173577 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8173577v0.webrev/ > > Thanks, > Robert > From robert.field at oracle.com Fri Feb 3 07:13:16 2017 From: robert.field at oracle.com (Robert Field) Date: Thu, 02 Feb 2017 23:13:16 -0800 Subject: RFR 8173845: JShell API: not patch compatible Message-ID: <58942D8C.1070500@oracle.com> Please review.... Bug: https://bugs.openjdk.java.net/browse/JDK-8173845 Webrev: http://cr.openjdk.java.net/~rfield/8173845v0.webrev/ Note: the additional test was the straw that broke the camels back -- I could not get the tests to run without running out of memory, so, for them to pass I had to add more memory clean-up. Thanks, Robert From jan.lahoda at oracle.com Fri Feb 3 14:23:25 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Fri, 3 Feb 2017 15:23:25 +0100 Subject: RFR 8173845: JShell API: not patch compatible In-Reply-To: <58942D8C.1070500@oracle.com> References: <58942D8C.1070500@oracle.com> Message-ID: <5894925D.1020307@oracle.com> Overall, seems OK to me. Regarding the removal of final, I wonder: I would expect that after the JShell is closed, the whole JShell instance would be released (so that it would be GCed eventually). Who is keeping the instance(s)? Thanks, Jan On 3.2.2017 08:13, Robert Field wrote: > Please review.... > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8173845 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8173845v0.webrev/ > > Note: the additional test was the straw that broke the camels back -- I > could not get the tests to run without running out of memory, so, for > them to pass I had to add more memory clean-up. > > Thanks, > Robert > From robert.field at oracle.com Fri Feb 3 15:54:27 2017 From: robert.field at oracle.com (Robert Field) Date: Fri, 03 Feb 2017 07:54:27 -0800 Subject: RFR 8173845: JShell API: not patch compatible In-Reply-To: <5894925D.1020307@oracle.com> References: <58942D8C.1070500@oracle.com> <5894925D.1020307@oracle.com> Message-ID: <5894A7B3.9020901@oracle.com> On 02/03/17 06:23, Jan Lahoda wrote: > Overall, seems OK to me. Regarding the removal of final, I wonder: I > would expect that after the JShell is closed, the whole JShell > instance would be released (so that it would be GCed eventually). Who > is keeping the instance(s)? Over the course of the test runs, hundreds of instances of JShell, the memory use continuously grows, into hundreds of megabytes, eventually causing out of memory. With these changes it still grows, but not as fast. I looked but could not find who is holding the instances. I'm breaking the memory leak part into a separate bug. -Robert > > Thanks, > Jan > > On 3.2.2017 08:13, Robert Field wrote: >> Please review.... >> >> Bug: >> >> https://bugs.openjdk.java.net/browse/JDK-8173845 >> >> Webrev: >> >> http://cr.openjdk.java.net/~rfield/8173845v0.webrev/ >> >> Note: the additional test was the straw that broke the camels back -- I >> could not get the tests to run without running out of memory, so, for >> them to pass I had to add more memory clean-up. >> >> Thanks, >> Robert >> From jan.lahoda at oracle.com Fri Feb 3 21:13:19 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Fri, 3 Feb 2017 22:13:19 +0100 Subject: RFR: JDK-8173653: jshell tool: ctrl-C when in external editor aborts jshell -- history lost Message-ID: <5894F26F.2060704@oracle.com> Hi, When an external editor is running, the terminal is switched back to the original mode, mostly so that we can detect if the external editor is a terminal editor or not (terminal editors switch the terminal to raw mode). But this means that the normal Ctrl-C functionality is restored, and so pressing Ctrl-C in JShell kills it. The proposed patch is to disable the normal Ctrl-C functionality while running the external editor. Ctrl-C will be placed into the System.in as any other input. The patch also fixes behavior with terminal editors on Windows, by detecting them (when JShell detects a terminal editor, it won't recompile the snippets while the editor is running, as it would distort the editor). Needs a tiny change to jdk.internal.le, I'll see if I can get something along these lines to the upstream. langtools repository changes: http://cr.openjdk.java.net/~jlahoda/8173653/langtools.00/ jdk repository changes: http://cr.openjdk.java.net/~jlahoda/8173653/jdk.00/ Bug: https://bugs.openjdk.java.net/browse/JDK-8173653 Any feedback is welcome. Thanks, Jan From robert.field at oracle.com Sat Feb 4 01:15:49 2017 From: robert.field at oracle.com (Robert Field) Date: Fri, 03 Feb 2017 17:15:49 -0800 Subject: RFR: JDK-8173653: jshell tool: ctrl-C when in external editor aborts jshell -- history lost In-Reply-To: <5894F26F.2060704@oracle.com> References: <5894F26F.2060704@oracle.com> Message-ID: <58952B45.1010201@oracle.com> Looks good. -Robert On 02/03/17 13:13, Jan Lahoda wrote: > Hi, > > When an external editor is running, the terminal is switched back to > the original mode, mostly so that we can detect if the external editor > is a terminal editor or not (terminal editors switch the terminal to > raw mode). But this means that the normal Ctrl-C functionality is > restored, and so pressing Ctrl-C in JShell kills it. > > The proposed patch is to disable the normal Ctrl-C functionality while > running the external editor. Ctrl-C will be placed into the System.in > as any other input. The patch also fixes behavior with terminal > editors on Windows, by detecting them (when JShell detects a terminal > editor, it won't recompile the snippets while the editor is running, > as it would distort the editor). > > Needs a tiny change to jdk.internal.le, I'll see if I can get > something along these lines to the upstream. > > langtools repository changes: > http://cr.openjdk.java.net/~jlahoda/8173653/langtools.00/ > jdk repository changes: > http://cr.openjdk.java.net/~jlahoda/8173653/jdk.00/ > Bug: > https://bugs.openjdk.java.net/browse/JDK-8173653 > > Any feedback is welcome. > > Thanks, > Jan From robert.field at oracle.com Sat Feb 4 06:45:27 2017 From: robert.field at oracle.com (Robert Field) Date: Fri, 03 Feb 2017 22:45:27 -0800 Subject: RFR 8173807: JShell: control characters should be escaped in String values Message-ID: <58957887.1000508@oracle.com> Please review... Bug: https://bugs.openjdk.java.net/browse/JDK-8173807 Webrev: http://cr.openjdk.java.net/~rfield/8173807v0.webrev/ Thanks, Robert :z From robert.field at oracle.com Sun Feb 5 03:33:16 2017 From: robert.field at oracle.com (Robert Field) Date: Sat, 04 Feb 2017 19:33:16 -0800 Subject: RFR 8173848: JShell: less-than causes: reached end of file while parsing Message-ID: <58969CFC.4010008@oracle.com> Please review,,, Bug: https://bugs.openjdk.java.net/browse/JDK-8173848 Webrev: http://cr.openjdk.java.net/~rfield/8173848v0.webrev/ Thanks, Robert :a From jan.lahoda at oracle.com Mon Feb 6 07:35:34 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Mon, 6 Feb 2017 08:35:34 +0100 Subject: RFR 8173848: JShell: less-than causes: reached end of file while parsing In-Reply-To: <58969CFC.4010008@oracle.com> References: <58969CFC.4010008@oracle.com> Message-ID: <58982746.6060003@oracle.com> I think it would be more idiomatic to use preRegister instead of instance with parameter, like sketched out here: http://cr.openjdk.java.net/~jlahoda/8173848/8173848-with-parser-preregister Otherwise, looks good. Jan On 5.2.2017 04:33, Robert Field wrote: > Please review,,, > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8173848 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8173848v0.webrev/ > > Thanks, > Robert > > :a > From robert.field at oracle.com Mon Feb 6 08:08:51 2017 From: robert.field at oracle.com (Robert Field) Date: Mon, 06 Feb 2017 00:08:51 -0800 Subject: RFR 8173848: JShell: less-than causes: reached end of file while parsing In-Reply-To: <58982746.6060003@oracle.com> References: <58969CFC.4010008@oracle.com> <58982746.6060003@oracle.com> Message-ID: <15a1277e238.2774.4011f3a8741ca2aabce58b8b81f42d24@oracle.com> Thanks, will update. Robert On February 5, 2017 11:35:39 PM Jan Lahoda wrote: > I think it would be more idiomatic to use preRegister instead of > instance with parameter, like sketched out here: > http://cr.openjdk.java.net/~jlahoda/8173848/8173848-with-parser-preregister > > Otherwise, looks good. > > Jan > > On 5.2.2017 04:33, Robert Field wrote: >> Please review,,, >> >> Bug: >> >> https://bugs.openjdk.java.net/browse/JDK-8173848 >> >> Webrev: >> >> http://cr.openjdk.java.net/~rfield/8173848v0.webrev/ >> >> Thanks, >> Robert >> >> :a >> From jan.lahoda at oracle.com Mon Feb 6 15:23:02 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Mon, 6 Feb 2017 16:23:02 +0100 Subject: RFR 8173807: JShell: control characters should be escaped in String values In-Reply-To: <58957887.1000508@oracle.com> References: <58957887.1000508@oracle.com> Message-ID: <589894D6.6010906@oracle.com> Seems OK. Jan On 4.2.2017 07:45, Robert Field wrote: > Please review... > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8173807 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8173807v0.webrev/ > > Thanks, > Robert > > :z > From jan.lahoda at oracle.com Mon Feb 6 15:53:58 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Mon, 6 Feb 2017 16:53:58 +0100 Subject: RFR JDK-8173777: Merge javac -Xmodule into javac--patch-module Message-ID: <58989C16.80404@oracle.com> Hi, I'd like to ask for a review of a patch that merges the -Xmodule: functionality into --patch-module. After this patch, the input source files are matched against modules patched with --patch-module, and are compiled as-if they were part of the module they are patching. (In the multi-module mode, patches for more than one module can be compiled, in the single-module mode, patches for only one module can be compiled.) Removal of the -Xmodule: option will need adjustments in several repositories, as tests in multiple repositories are currently using -Xmodule:, and also jtreg is using the option. The current patch hence preserves the existing -Xmodule: functionality, although the option is hidden and no longer announced in help. I think it would be good to push the javac/langtools change proposed below, and then continue with other repositories. The langtools patch is here: http://cr.openjdk.java.net/~jlahoda/8173777/langtools.00/ (note it also contains changes to jshell and javadoc). Proposed jdk repository changes are here: http://cr.openjdk.java.net/~jlahoda/8173777/jdk.00/ How does this look? Any feedback is welcome. Thanks, Jan From jan.lahoda at oracle.com Mon Feb 6 18:41:49 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Mon, 6 Feb 2017 19:41:49 +0100 Subject: RFR JDK-8173777: Merge javac -Xmodule into javac--patch-module In-Reply-To: <58989C16.80404@oracle.com> References: <58989C16.80404@oracle.com> Message-ID: <5898C36D.30902@oracle.com> I've updated the jdk repository webrev to wrap long lines: http://cr.openjdk.java.net/~jlahoda/8173777/jdk.01/ Jan On 6.2.2017 16:53, Jan Lahoda wrote: > Hi, > > I'd like to ask for a review of a patch that merges the -Xmodule: > functionality into --patch-module. After this patch, the input source > files are matched against modules patched with --patch-module, and are > compiled as-if they were part of the module they are patching. (In the > multi-module mode, patches for more than one module can be compiled, in > the single-module mode, patches for only one module can be compiled.) > > Removal of the -Xmodule: option will need adjustments in several > repositories, as tests in multiple repositories are currently using > -Xmodule:, and also jtreg is using the option. The current patch hence > preserves the existing -Xmodule: functionality, although the option is > hidden and no longer announced in help. I think it would be good to push > the javac/langtools change proposed below, and then continue with other > repositories. > > The langtools patch is here: > http://cr.openjdk.java.net/~jlahoda/8173777/langtools.00/ > > (note it also contains changes to jshell and javadoc). > > Proposed jdk repository changes are here: > http://cr.openjdk.java.net/~jlahoda/8173777/jdk.00/ > > How does this look? > > Any feedback is welcome. > > Thanks, > Jan From Alan.Bateman at oracle.com Mon Feb 6 20:42:50 2017 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Mon, 6 Feb 2017 20:42:50 +0000 Subject: RFR JDK-8173777: Merge javac -Xmodule into javac--patch-module In-Reply-To: <5898C36D.30902@oracle.com> References: <58989C16.80404@oracle.com> <5898C36D.30902@oracle.com> Message-ID: <206f4364-1d18-fed8-840a-f655b235b943@oracle.com> On 06/02/2017 18:41, Jan Lahoda wrote: > I've updated the jdk repository webrev to wrap long lines: > http://cr.openjdk.java.net/~jlahoda/8173777/jdk.01/ > > Jan This looks okay to me. -Alan From robert.field at oracle.com Tue Feb 7 00:42:06 2017 From: robert.field at oracle.com (Robert Field) Date: Mon, 06 Feb 2017 16:42:06 -0800 Subject: RFR 8173916 / 8174028 / 817404: Message-ID: <589917DE.7000205@oracle.com> Please review... Bugs: 8173916: jshell tool: /methods signature confusing/non-standard format https://bugs.openjdk.java.net/browse/JDK-8173916 8174028: jshell tool: /method /type failed declaration listed (without indication) https://bugs.openjdk.java.net/browse/JDK-8174028 8174041: jshell tool: --startup PRINTING references undeclared Locale class https://bugs.openjdk.java.net/browse/JDK-8174041 Webrev: http://cr.openjdk.java.net/~rfield/8173916v0.webrev/ Thanks, Robert From robert.field at oracle.com Tue Feb 7 00:46:56 2017 From: robert.field at oracle.com (Robert Field) Date: Mon, 06 Feb 2017 16:46:56 -0800 Subject: RFR 8173916 / 8174028 / 817404: jshell tool: ... In-Reply-To: <589917DE.7000205@oracle.com> References: <589917DE.7000205@oracle.com> Message-ID: <58991900.5060606@oracle.com> [fixing the Subject line] Please review... Bugs: 8173916: jshell tool: /methods signature confusing/non-standard format https://bugs.openjdk.java.net/browse/JDK-8173916 8174028: jshell tool: /method /type failed declaration listed (without indication) https://bugs.openjdk.java.net/browse/JDK-8174028 8174041: jshell tool: --startup PRINTING references undeclared Locale class https://bugs.openjdk.java.net/browse/JDK-8174041 Webrev: http://cr.openjdk.java.net/~rfield/8173916v0.webrev/ Thanks, Robert From robert.field at oracle.com Tue Feb 7 04:22:46 2017 From: robert.field at oracle.com (Robert Field) Date: Mon, 06 Feb 2017 20:22:46 -0800 Subject: RFR 8173845: JShell API: not patch compatible In-Reply-To: <5894A7B3.9020901@oracle.com> References: <58942D8C.1070500@oracle.com> <5894925D.1020307@oracle.com> <5894A7B3.9020901@oracle.com> Message-ID: <58994B96.3040802@oracle.com> Webrev with memory related changes factored out: http://cr.openjdk.java.net/~rfield/8173845v1.webrev/ -Robert On 02/03/17 07:54, Robert Field wrote: > > On 02/03/17 06:23, Jan Lahoda wrote: >> Overall, seems OK to me. Regarding the removal of final, I wonder: I >> would expect that after the JShell is closed, the whole JShell >> instance would be released (so that it would be GCed eventually). Who >> is keeping the instance(s)? > > Over the course of the test runs, hundreds of instances of JShell, the > memory use continuously grows, into hundreds of megabytes, eventually > causing out of memory. With these changes it still grows, but not as > fast. I looked but could not find who is holding the instances. I'm > breaking the memory leak part into a separate bug. > > -Robert > >> >> Thanks, >> Jan >> >> On 3.2.2017 08:13, Robert Field wrote: >>> Please review.... >>> >>> Bug: >>> >>> https://bugs.openjdk.java.net/browse/JDK-8173845 >>> >>> Webrev: >>> >>> http://cr.openjdk.java.net/~rfield/8173845v0.webrev/ >>> >>> Note: the additional test was the straw that broke the camels back -- I >>> could not get the tests to run without running out of memory, so, for >>> them to pass I had to add more memory clean-up. >>> >>> Thanks, >>> Robert >>> > From jan.lahoda at oracle.com Tue Feb 7 14:58:13 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Tue, 7 Feb 2017 15:58:13 +0100 Subject: RFR 8173845: JShell API: not patch compatible In-Reply-To: <58994B96.3040802@oracle.com> References: <58942D8C.1070500@oracle.com> <5894925D.1020307@oracle.com> <5894A7B3.9020901@oracle.com> <58994B96.3040802@oracle.com> Message-ID: <5899E085.7070000@oracle.com> Seems fine to me. Jan On 7.2.2017 05:22, Robert Field wrote: > Webrev with memory related changes factored out: > > http://cr.openjdk.java.net/~rfield/8173845v1.webrev/ > > -Robert > > On 02/03/17 07:54, Robert Field wrote: >> >> On 02/03/17 06:23, Jan Lahoda wrote: >>> Overall, seems OK to me. Regarding the removal of final, I wonder: I >>> would expect that after the JShell is closed, the whole JShell >>> instance would be released (so that it would be GCed eventually). Who >>> is keeping the instance(s)? >> >> Over the course of the test runs, hundreds of instances of JShell, the >> memory use continuously grows, into hundreds of megabytes, eventually >> causing out of memory. With these changes it still grows, but not as >> fast. I looked but could not find who is holding the instances. I'm >> breaking the memory leak part into a separate bug. >> >> -Robert >> >>> >>> Thanks, >>> Jan >>> >>> On 3.2.2017 08:13, Robert Field wrote: >>>> Please review.... >>>> >>>> Bug: >>>> >>>> https://bugs.openjdk.java.net/browse/JDK-8173845 >>>> >>>> Webrev: >>>> >>>> http://cr.openjdk.java.net/~rfield/8173845v0.webrev/ >>>> >>>> Note: the additional test was the straw that broke the camels back -- I >>>> could not get the tests to run without running out of memory, so, for >>>> them to pass I had to add more memory clean-up. >>>> >>>> Thanks, >>>> Robert >>>> >> > From jan.lahoda at oracle.com Tue Feb 7 18:11:16 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Tue, 7 Feb 2017 19:11:16 +0100 Subject: RFR JDK-8173777: Merge javac -Xmodule into javac--patch-module In-Reply-To: <206f4364-1d18-fed8-840a-f655b235b943@oracle.com> References: <58989C16.80404@oracle.com> <5898C36D.30902@oracle.com> <206f4364-1d18-fed8-840a-f655b235b943@oracle.com> Message-ID: <589A0DC4.5020409@oracle.com> Hi, Thanks. I did two small updates to the patches: -for langtools repository, I added unwrapping to ClientCodeWrapper.WrappedJavaFileManager.getLocationForModule - the incoming JavaFileObject is unwrapped, so that we don't pass our wrappers to the client's code. Direct link: http://cr.openjdk.java.net/~jlahoda/8173777/langtools.01/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java.udiff.html -for jdk repository, I fixed the: test/javax/xml/jaxp/common/8035437/run.sh to use a platform specific path separator. This is based on code from jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh Direct link: http://cr.openjdk.java.net/~jlahoda/8173777/jdk.02/test/javax/xml/jaxp/common/8035437/run.sh.udiff.html (Sorry that I missed this before.) Updated webrevs: -langtools repository: http://cr.openjdk.java.net/~jlahoda/8173777/langtools.01/ -jdk repository: http://cr.openjdk.java.net/~jlahoda/8173777/jdk.02/ Thanks, Jan On 6.2.2017 21:42, Alan Bateman wrote: > > > On 06/02/2017 18:41, Jan Lahoda wrote: >> I've updated the jdk repository webrev to wrap long lines: >> http://cr.openjdk.java.net/~jlahoda/8173777/jdk.01/ >> >> Jan > This looks okay to me. > > -Alan > From robert.field at oracle.com Tue Feb 7 22:02:34 2017 From: robert.field at oracle.com (Robert Field) Date: Tue, 07 Feb 2017 14:02:34 -0800 Subject: RFR 8173893: JShell: reduce memory leaks Message-ID: <589A43FA.1090906@oracle.com> Thanks Jan for tracking down the leaks!!! Please review... Bug: https://bugs.openjdk.java.net/browse/JDK-8173893 Webrev: http://cr.openjdk.java.net/~rfield/8173893v0.webrev/ Thanks, Robert :y From jan.lahoda at oracle.com Wed Feb 8 14:32:15 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Wed, 8 Feb 2017 15:32:15 +0100 Subject: RFR 8173893: JShell: reduce memory leaks In-Reply-To: <589A43FA.1090906@oracle.com> References: <589A43FA.1090906@oracle.com> Message-ID: <589B2BEF.4060307@oracle.com> Seems good to me. Jan On 7.2.2017 23:02, Robert Field wrote: > Thanks Jan for tracking down the leaks!!! > > Please review... > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8173893 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8173893v0.webrev/ > > Thanks, > Robert > > :y > From jan.lahoda at oracle.com Wed Feb 8 20:46:31 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Wed, 8 Feb 2017 21:46:31 +0100 Subject: RFR JDK-8173777: Merge javac -Xmodule into javac--patch-module In-Reply-To: <589A0DC4.5020409@oracle.com> References: <58989C16.80404@oracle.com> <5898C36D.30902@oracle.com> <206f4364-1d18-fed8-840a-f655b235b943@oracle.com> <589A0DC4.5020409@oracle.com> Message-ID: <589B83A7.9020207@oracle.com> Hi, Based on some (offline) feedback and further testing, I've updated the langtools patch. The new webrev is here: http://cr.openjdk.java.net/~jlahoda/8173777/langtools.02/ Delta webrev compared to .01: http://cr.openjdk.java.net/~jlahoda/8173777/langtools.02/delta/webrev/index.html The changes in this updated version: -the previous version didn't allow the same file to be under both --patch-module and --module-source-path. The updated version allows this, and the --patch-module will prevail. This is currently only allowed when both --patch-module and --module-source-path agree on the name of the module, but this could be trivially removed if desired. -for incremental compilation, the previous version required that the class output is also specified in --patch-module. The updated version will automatically use class output to read classfiles for patch modules (by virtue of ModuleSymbol.patchOutputLocation). -the previous version didn't (always) report an error for module-info on --patch-module in multi-module mode. This should be fixed now, and there should be an error for module-info on patch location even in multi-module mode. I was looking at explicit uses of -Xmodule: in other repositories, and there are some in the hotspot repository. All these appear to use a utility from the top-level repository: test/lib/jdk/test/lib/InMemoryJavaCompiler.java (there are other tests that use @compile/module in various repositories, including hotspot, but these need to be coordinated with jtreg). For now, I propose to tweak the utility to interpret -Xmodule: itself: http://cr.openjdk.java.net/~jlahoda/8173777/top-level.00/ Eventually, we could stop using -Xmodule: inside this utility and pass the module name explicitly, e.g. encoded in the className, but for now this seems acceptable to me. Feedback is welcome. Thanks! Jan On 7.2.2017 19:11, Jan Lahoda wrote: > Hi, > > Thanks. > > I did two small updates to the patches: > -for langtools repository, I added unwrapping to > ClientCodeWrapper.WrappedJavaFileManager.getLocationForModule - the > incoming JavaFileObject is unwrapped, so that we don't pass our wrappers > to the client's code. Direct link: > http://cr.openjdk.java.net/~jlahoda/8173777/langtools.01/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java.udiff.html > > > -for jdk repository, I fixed the: > test/javax/xml/jaxp/common/8035437/run.sh > to use a platform specific path separator. This is based on code from > jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh > Direct link: > http://cr.openjdk.java.net/~jlahoda/8173777/jdk.02/test/javax/xml/jaxp/common/8035437/run.sh.udiff.html > > > (Sorry that I missed this before.) > > Updated webrevs: > -langtools repository: > http://cr.openjdk.java.net/~jlahoda/8173777/langtools.01/ > -jdk repository: > http://cr.openjdk.java.net/~jlahoda/8173777/jdk.02/ > > Thanks, > Jan > > On 6.2.2017 21:42, Alan Bateman wrote: >> >> >> On 06/02/2017 18:41, Jan Lahoda wrote: >>> I've updated the jdk repository webrev to wrap long lines: >>> http://cr.openjdk.java.net/~jlahoda/8173777/jdk.01/ >>> >>> Jan >> This looks okay to me. >> >> -Alan >> From jan.lahoda at oracle.com Wed Feb 8 20:56:40 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Wed, 8 Feb 2017 21:56:40 +0100 Subject: RFR 8173916 / 8174028 / 817404: jshell tool: ... In-Reply-To: <58991900.5060606@oracle.com> References: <589917DE.7000205@oracle.com> <58991900.5060606@oracle.com> Message-ID: <589B8608.9000606@oracle.com> Seems OK to me. Jan On 7.2.2017 01:46, Robert Field wrote: > [fixing the Subject line] > > Please review... > > Bugs: > > 8173916: jshell tool: /methods signature confusing/non-standard format > https://bugs.openjdk.java.net/browse/JDK-8173916 > > 8174028: jshell tool: /method /type failed declaration listed > (without indication) > https://bugs.openjdk.java.net/browse/JDK-8174028 > > 8174041: jshell tool: --startup PRINTING references undeclared > Locale class > https://bugs.openjdk.java.net/browse/JDK-8174041 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8173916v0.webrev/ > > Thanks, > Robert > > > From robert.field at oracle.com Wed Feb 8 21:33:29 2017 From: robert.field at oracle.com (Robert Field) Date: Wed, 08 Feb 2017 13:33:29 -0800 Subject: RFR JDK-8173777: Merge javac -Xmodule into javac--patch-module In-Reply-To: <58989C16.80404@oracle.com> References: <58989C16.80404@oracle.com> Message-ID: <589B8EA9.3030309@oracle.com> JShell changes to the memory file manager look good. -Robert On 02/06/17 07:53, Jan Lahoda wrote: > Hi, > > I'd like to ask for a review of a patch that merges the -Xmodule: > functionality into --patch-module. After this patch, the input source > files are matched against modules patched with --patch-module, and are > compiled as-if they were part of the module they are patching. (In the > multi-module mode, patches for more than one module can be compiled, > in the single-module mode, patches for only one module can be compiled.) > > Removal of the -Xmodule: option will need adjustments in several > repositories, as tests in multiple repositories are currently using > -Xmodule:, and also jtreg is using the option. The current patch hence > preserves the existing -Xmodule: functionality, although the option is > hidden and no longer announced in help. I think it would be good to > push the javac/langtools change proposed below, and then continue with > other repositories. > > The langtools patch is here: > http://cr.openjdk.java.net/~jlahoda/8173777/langtools.00/ > > (note it also contains changes to jshell and javadoc). > > Proposed jdk repository changes are here: > http://cr.openjdk.java.net/~jlahoda/8173777/jdk.00/ > > How does this look? > > Any feedback is welcome. > > Thanks, > Jan From robert.field at oracle.com Wed Feb 8 21:38:06 2017 From: robert.field at oracle.com (Robert Field) Date: Wed, 08 Feb 2017 13:38:06 -0800 Subject: RFR JDK-8173777: Merge javac -Xmodule into javac--patch-module In-Reply-To: <589B83A7.9020207@oracle.com> References: <58989C16.80404@oracle.com> <5898C36D.30902@oracle.com> <206f4364-1d18-fed8-840a-f655b235b943@oracle.com> <589A0DC4.5020409@oracle.com> <589B83A7.9020207@oracle.com> Message-ID: <589B8FBE.3060600@oracle.com> JShell changes to the memory file manager are unchanged in this update and so still look good. -Robert On 02/08/17 12:46, Jan Lahoda wrote: > Hi, > > Based on some (offline) feedback and further testing, I've updated the > langtools patch. The new webrev is here: > http://cr.openjdk.java.net/~jlahoda/8173777/langtools.02/ > > Delta webrev compared to .01: > http://cr.openjdk.java.net/~jlahoda/8173777/langtools.02/delta/webrev/index.html > > > The changes in this updated version: > -the previous version didn't allow the same file to be under both > --patch-module and --module-source-path. The updated version allows > this, and the --patch-module will prevail. This is currently only > allowed when both --patch-module and --module-source-path agree on the > name of the module, but this could be trivially removed if desired. > > -for incremental compilation, the previous version required that the > class output is also specified in --patch-module. The updated version > will automatically use class output to read classfiles for patch > modules (by virtue of ModuleSymbol.patchOutputLocation). > > -the previous version didn't (always) report an error for module-info > on --patch-module in multi-module mode. This should be fixed now, and > there should be an error for module-info on patch location even in > multi-module mode. > > I was looking at explicit uses of -Xmodule: in other repositories, and > there are some in the hotspot repository. All these appear to use a > utility from the top-level repository: > test/lib/jdk/test/lib/InMemoryJavaCompiler.java > (there are other tests that use @compile/module in various > repositories, including hotspot, but these need to be coordinated with > jtreg). For now, I propose to tweak the utility to interpret -Xmodule: > itself: > http://cr.openjdk.java.net/~jlahoda/8173777/top-level.00/ > > Eventually, we could stop using -Xmodule: inside this utility and pass > the module name explicitly, e.g. encoded in the className, but for now > this seems acceptable to me. > > Feedback is welcome. > > Thanks! > > Jan > > > On 7.2.2017 19:11, Jan Lahoda wrote: >> Hi, >> >> Thanks. >> >> I did two small updates to the patches: >> -for langtools repository, I added unwrapping to >> ClientCodeWrapper.WrappedJavaFileManager.getLocationForModule - the >> incoming JavaFileObject is unwrapped, so that we don't pass our wrappers >> to the client's code. Direct link: >> http://cr.openjdk.java.net/~jlahoda/8173777/langtools.01/src/jdk.compiler/share/classes/com/sun/tools/javac/api/ClientCodeWrapper.java.udiff.html >> >> >> >> -for jdk repository, I fixed the: >> test/javax/xml/jaxp/common/8035437/run.sh >> to use a platform specific path separator. This is based on code from >> jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh >> Direct link: >> http://cr.openjdk.java.net/~jlahoda/8173777/jdk.02/test/javax/xml/jaxp/common/8035437/run.sh.udiff.html >> >> >> >> (Sorry that I missed this before.) >> >> Updated webrevs: >> -langtools repository: >> http://cr.openjdk.java.net/~jlahoda/8173777/langtools.01/ >> -jdk repository: >> http://cr.openjdk.java.net/~jlahoda/8173777/jdk.02/ >> >> Thanks, >> Jan >> >> On 6.2.2017 21:42, Alan Bateman wrote: >>> >>> >>> On 06/02/2017 18:41, Jan Lahoda wrote: >>>> I've updated the jdk repository webrev to wrap long lines: >>>> http://cr.openjdk.java.net/~jlahoda/8173777/jdk.01/ >>>> >>>> Jan >>> This looks okay to me. >>> >>> -Alan >>> From jan.lahoda at oracle.com Thu Feb 9 16:02:57 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Thu, 9 Feb 2017 17:02:57 +0100 Subject: RFR JDK-8174245: Javadoc is not working for some methods Message-ID: <589C92B1.3010007@oracle.com> Hi, Bug: https://bugs.openjdk.java.net/browse/JDK-8174245 Webrev: http://cr.openjdk.java.net/~jlahoda/8174245/webrev.00/ The primary problem here is that showing javadoc for e.g.: Collections.min( or: Collections.max( fails. The reason is that when JavadocHelper computes the javadoc for the method, it needs to parse the source for the given class, and find the method in the parsed source. But, when parsing/entering java.util.Collections outside of the java.base module, the MethodSymbols for the min/max (and other) methods are too much broken to be recognized as the methods we are searching for (because the java.util package belongs to the java.base module). The proposed solution is to use the new --patch-module semantics to parse/enter the class as-if it was in the java.base module. Note that patch depends on this change: http://cr.openjdk.java.net/~jlahoda/8173777/langtools.02/ A secondary problem is that when printing multiple javadocs, there is a note printed: but it may not be fully overwritten when writing the next javadoc (or page). The proposed solution is to simply overwrite it with spaces before writing the further text. Feedback is welcome! Thanks, Jan From robert.field at oracle.com Thu Feb 9 19:21:27 2017 From: robert.field at oracle.com (Robert Field) Date: Thu, 09 Feb 2017 11:21:27 -0800 Subject: RFR JDK-8174245: Javadoc is not working for some methods In-Reply-To: <589C92B1.3010007@oracle.com> References: <589C92B1.3010007@oracle.com> Message-ID: <589CC137.1060703@oracle.com> Looks good. Style nit (fix or not): When conditionals are multi-line, JShell uses conditional ? trueCase : falseCase Which is consistent with this and other style guides: http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-136091.html The JavadocHelper.java code is in the compiler module, which by non-random sampling appears to use several styles, including the above, but more: conditional? trueCase : falseCase I'm only pointing this out because I found the two line form hard to read. -Robert On 02/09/17 08:02, Jan Lahoda wrote: > Hi, > > Bug: > https://bugs.openjdk.java.net/browse/JDK-8174245 > > Webrev: > http://cr.openjdk.java.net/~jlahoda/8174245/webrev.00/ > > The primary problem here is that showing javadoc for e.g.: > Collections.min( > or: > Collections.max( > > fails. The reason is that when JavadocHelper computes the javadoc for > the method, it needs to parse the source for the given class, and find > the method in the parsed source. But, when parsing/entering > java.util.Collections outside of the java.base module, the > MethodSymbols for the min/max (and other) methods are too much broken > to be recognized as the methods we are searching for (because the > java.util package belongs to the java.base module). The proposed > solution is to use the new --patch-module semantics to parse/enter the > class as-if it was in the java.base module. > > Note that patch depends on this change: > http://cr.openjdk.java.net/~jlahoda/8173777/langtools.02/ > > A secondary problem is that when printing multiple javadocs, there is > a note printed: > > but it may not be fully overwritten when writing the next javadoc (or > page). The proposed solution is to simply overwrite it with spaces > before writing the further text. > > Feedback is welcome! > > Thanks, > Jan From robert.field at oracle.com Thu Feb 9 22:18:35 2017 From: robert.field at oracle.com (Robert Field) Date: Thu, 09 Feb 2017 14:18:35 -0800 Subject: RFR (XXS) 8174672: JShell tests: jdk/jshell/UserJdiUserRemoteTest.java problem listed with wrong bug number Message-ID: <589CEABB.8050205@oracle.com> Please review... Bug: https://bugs.openjdk.java.net/browse/JDK-8174672 Webrev: http://cr.openjdk.java.net/~rfield/8174672v0.webrev/ Which is just the substitution of "8173204" with "8173079" -- or: diff -r 7549af75ce62 test/ProblemList.txt --- a/test/ProblemList.txt Thu Feb 09 18:09:48 2017 +0000 +++ b/test/ProblemList.txt Thu Feb 09 11:57:41 2017 -0800 @@ -36,7 +36,7 @@ # # jshell -jdk/jshell/UserJdiUserRemoteTest.java 8173204 linux-all +jdk/jshell/UserJdiUserRemoteTest.java 8173079 linux-all jdk/jshell/UserInputTest.java 8169536 generic-all ########################################################################### From jonathan.gibbons at oracle.com Thu Feb 9 22:33:44 2017 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Thu, 09 Feb 2017 14:33:44 -0800 Subject: RFR (XXS) 8174672: JShell tests: jdk/jshell/UserJdiUserRemoteTest.java problem listed with wrong bug number In-Reply-To: <589CEABB.8050205@oracle.com> References: <589CEABB.8050205@oracle.com> Message-ID: <589CEE48.4060400@oracle.com> OK On 02/09/2017 02:18 PM, Robert Field wrote: > Please review... > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8174672 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8174672v0.webrev/ > > Which is just the substitution of "8173204" with "8173079" -- or: > > diff -r 7549af75ce62 test/ProblemList.txt > --- a/test/ProblemList.txt Thu Feb 09 18:09:48 2017 +0000 > +++ b/test/ProblemList.txt Thu Feb 09 11:57:41 2017 -0800 > @@ -36,7 +36,7 @@ > # > # jshell > > -jdk/jshell/UserJdiUserRemoteTest.java 8173204 linux-all > +jdk/jshell/UserJdiUserRemoteTest.java 8173079 linux-all > jdk/jshell/UserInputTest.java 8169536 generic-all > > ########################################################################### > From robert.field at oracle.com Fri Feb 10 00:32:20 2017 From: robert.field at oracle.com (Robert Field) Date: Thu, 09 Feb 2017 16:32:20 -0800 Subject: RFR (XS) 8174262: Error message misspelling: "instanciated" Message-ID: <589D0A14.6080606@oracle.com> Please review... Bug: https://bugs.openjdk.java.net/browse/JDK-8174262 Webrev: http://cr.openjdk.java.net/~rfield/8174262v0.webrev/ Thanks, Robert From jonathan.gibbons at oracle.com Fri Feb 10 00:38:14 2017 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Thu, 09 Feb 2017 16:38:14 -0800 Subject: RFR (XS) 8174262: Error message misspelling: "instanciated" In-Reply-To: <589D0A14.6080606@oracle.com> References: <589D0A14.6080606@oracle.com> Message-ID: <589D0B76.3020203@oracle.com> Looks good to me. -- Jon On 02/09/2017 04:32 PM, Robert Field wrote: > Please review... > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8174262 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8174262v0.webrev/ > > Thanks, > Robert > From robert.field at oracle.com Fri Feb 10 19:44:05 2017 From: robert.field at oracle.com (Robert Field) Date: Fri, 10 Feb 2017 11:44:05 -0800 Subject: RFR 8174762: JShell: @since tags missing Message-ID: <589E1805.5050604@oracle.com> Please review.... Bug: https://bugs.openjdk.java.net/browse/JDK-8174762 Webrev: http://cr.openjdk.java.net/~rfield/8174762v0.webrev/ I just self-reviewed using the webrev, and now my fingers are cramped ;-) Probably easier to review "hg diff" below ... diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -45,6 +45,8 @@ * DeclarationSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 */ public abstract class DeclarationSnippet extends PersistentSnippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/Diag.java --- a/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Fri Feb 10 11:34:16 2017 -0800 @@ -30,6 +30,8 @@ /** * Diagnostic information for a Snippet. + * + * @since 9 * @see jdk.jshell.JShell#diagnostics(jdk.jshell.Snippet) */ public abstract class Diag { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -34,6 +34,8 @@ * ErroneousSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 */ public class ErroneousSnippet extends Snippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/EvalException.java --- a/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java Fri Feb 10 11:34:16 2017 -0800 @@ -38,6 +38,8 @@ * the Snippet id and for snippets without a method name (for example an * expression) StackTraceElement.getMethodName() will be the * empty string. + * + * @since 9 */ @SuppressWarnings("serial") // serialVersionUID intentionally omitted public class EvalException extends JShellException { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -34,6 +34,8 @@ * ExpressionSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 15: Expression. */ public class ExpressionSnippet extends Snippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -34,6 +34,8 @@ * {@code ImportSnippet} is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 8.3: importDeclaration. */ public class ImportSnippet extends PersistentSnippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/JShell.java --- a/src/jdk.jshell/share/classes/jdk/jshell/JShell.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/JShell.java Fri Feb 10 11:34:16 2017 -0800 @@ -79,7 +79,9 @@ *

* This class is not thread safe, except as noted, all access should be through * a single thread. + * * @author Robert Field + * @since 9 */ public class JShell implements AutoCloseable { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/JShellException.java --- a/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java Fri Feb 10 11:34:16 2017 -0800 @@ -27,6 +27,8 @@ /** * The superclass of JShell generated exceptions + * + * @since 9 */ @SuppressWarnings("serial") // serialVersionUID intentionally omitted public class JShellException extends Exception { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -35,6 +35,8 @@ * MethodSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 8.4: MethodDeclaration. */ public class MethodSnippet extends DeclarationSnippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java --- a/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java Fri Feb 10 11:34:16 2017 -0800 @@ -32,7 +32,7 @@ * The outer wrap for a set of snippets wrapped in a generated class * @author Robert Field */ -public class OuterImportSnippetWrap extends OuterWrap { +class OuterImportSnippetWrap extends OuterWrap { private final Snippet snippet; diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java --- a/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java Fri Feb 10 11:34:16 2017 -0800 @@ -35,7 +35,7 @@ * The outer wrap for a set of snippets wrapped in a generated class * @author Robert Field */ -public class OuterSnippetsClassWrap extends OuterWrap { +class OuterSnippetsClassWrap extends OuterWrap { private final String className; private final LinkedHashMap wrapToSnippet; diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java --- a/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java Fri Feb 10 11:34:16 2017 -0800 @@ -44,7 +44,7 @@ * * @author Robert Field */ -public class OuterWrapMap { +class OuterWrapMap { private final JShell state; private final Map classOuters = new HashMap<>(); diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -34,6 +34,8 @@ * PersistentSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 */ public abstract class PersistentSnippet extends Snippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/Snippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -39,7 +39,9 @@ * state engine, query {@code JShell} passing the Snippet. *

* Because it is immutable, {@code Snippet} (and subclasses) is thread-safe. + * * @author Robert Field + * @since 9 * @see jdk.jshell.JShell#status */ public abstract class Snippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java --- a/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java Fri Feb 10 11:34:16 2017 -0800 @@ -38,7 +38,9 @@ * {@code SnippetEvent} is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * * @author Robert Field + * @since 9 */ public class SnippetEvent { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java --- a/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java Fri Feb 10 11:34:16 2017 -0800 @@ -39,6 +39,7 @@ * etc. * Also includes completion suggestions, as might be used in tab-completion. * + * @since 9 */ public abstract class SourceCodeAnalysis { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -34,6 +34,8 @@ * StatementSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 14.5: Statement. */ public class StatementSnippet extends Snippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -36,6 +36,8 @@ * TypeDeclSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 */ public class TypeDeclSnippet extends DeclarationSnippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java --- a/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java Fri Feb 10 11:34:16 2017 -0800 @@ -36,6 +36,8 @@ * the Snippet id and for snippets without a method name (for example an * expression) StackTraceElement.getName() will be the * empty string. + * + * @since 9 */ @SuppressWarnings("serial") // serialVersionUID intentionally omitted public class UnresolvedReferenceException extends JShellException { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java --- a/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java Fri Feb 10 11:34:16 2017 -0800 @@ -35,6 +35,8 @@ * VarSnippet is immutable: an access to * any of its methods will always return the same result. * and thus is thread-safe. + * + * @since 9 * @jls 8.3: FieldDeclaration. */ public class VarSnippet extends DeclarationSnippet { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java Fri Feb 10 11:34:16 2017 -0800 @@ -39,6 +39,7 @@ * * @author Robert Field * @author Jan Lahoda + * @since 9 */ public class DirectExecutionControl implements ExecutionControl { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java Fri Feb 10 11:34:16 2017 -0800 @@ -37,6 +37,8 @@ /** * Tries other providers in sequence until one works. + * + * @since 9 */ public class FailOverExecutionControlProvider implements ExecutionControlProvider{ diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java Fri Feb 10 11:34:16 2017 -0800 @@ -61,6 +61,7 @@ * * @author Robert Field * @author Jan Lahoda + * @since 9 */ public class JdiDefaultExecutionControl extends JdiExecutionControl { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java Fri Feb 10 11:34:16 2017 -0800 @@ -37,7 +37,9 @@ import static java.util.stream.Collectors.toMap; /** - * Abstract JDI implementation of {@link jdk.jshell.spi.ExecutionControl} + * Abstract JDI implementation of {@link jdk.jshell.spi.ExecutionControl}. + * + * @since 9 */ public abstract class JdiExecutionControl extends StreamingExecutionControl implements ExecutionControl { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java Fri Feb 10 11:34:16 2017 -0800 @@ -35,7 +35,9 @@ /** * A provider of remote JDI-controlled execution engines. + * * @author Robert Field + * @since 9 */ public class JdiExecutionControlProvider implements ExecutionControlProvider { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java Fri Feb 10 11:34:16 2017 -0800 @@ -47,6 +47,8 @@ /** * Sets up a JDI connection, providing the resulting JDI {@link VirtualMachine} * and the {@link Process} the remote agent is running in. + * + * @since 9 */ public class JdiInitiator { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java Fri Feb 10 11:34:16 2017 -0800 @@ -34,6 +34,8 @@ * This interface specifies the loading specific subset of * {@link jdk.jshell.spi.ExecutionControl}. For use in encapsulating the * {@link java.lang.ClassLoader} implementation. + * + * @since 9 */ public interface LoaderDelegate { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java Fri Feb 10 11:34:16 2017 -0800 @@ -33,6 +33,7 @@ * in the same JVM as the JShell-core. * * @author Grigory Ptashko + * @since 9 */ public class LocalExecutionControl extends DirectExecutionControl { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java Fri Feb 10 11:34:16 2017 -0800 @@ -32,7 +32,9 @@ /** * A provider of execution engines which run in the same process as JShell. + * * @author Robert Field + * @since 9 */ public class LocalExecutionControlProvider implements ExecutionControlProvider{ diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java Fri Feb 10 11:34:16 2017 -0800 @@ -45,6 +45,7 @@ * * @author Jan Lahoda * @author Robert Field + * @since 9 */ public class RemoteExecutionControl extends DirectExecutionControl implements ExecutionControl { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java Fri Feb 10 11:34:16 2017 -0800 @@ -37,6 +37,7 @@ * execution takes place. * * @author Robert Field + * @since 9 */ public class StreamingExecutionControl implements ExecutionControl { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java Fri Feb 10 11:34:16 2017 -0800 @@ -53,6 +53,7 @@ * * @author Jan Lahoda * @author Robert Field + * @since 9 */ public class Util { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java Fri Feb 10 11:34:16 2017 -0800 @@ -30,5 +30,7 @@ * Also, provides related communication utilities. * This package may be used to define alternative execution engines. * The default JShell execution engine is included. + * + * @since 9 */ package jdk.jshell.execution; diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/package-info.java --- a/src/jdk.jshell/share/classes/jdk/jshell/package-info.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/package-info.java Fri Feb 10 11:34:16 2017 -0800 @@ -140,6 +140,8 @@ * provide source boundary and completeness analysis to address cases like * those. SourceCodeAnalysis also provides suggested completions * of input, as might be used in tab-completion. + * + * @since 9 */ diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java Fri Feb 10 11:34:16 2017 -0800 @@ -45,6 +45,8 @@ *

* Methods defined in this interface should only be called by the core JShell * implementation. + * + * @since 9 */ public interface ExecutionControl extends AutoCloseable { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java Fri Feb 10 11:34:16 2017 -0800 @@ -33,7 +33,9 @@ * evaluate Snippets. Alternate execution engines can be created by * implementing this interface, then configuring JShell with the provider or * the providers name and parameter specifier. + * * @author Robert Field + * @since 9 */ public interface ExecutionControlProvider { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java Fri Feb 10 11:34:16 2017 -0800 @@ -36,6 +36,7 @@ * This interface is designed to provide the access to core JShell functionality * needed to implement ExecutionControl. * + * @since 9 * @see ExecutionControl */ public interface ExecutionEnv { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java Fri Feb 10 11:34:16 2017 -0800 @@ -33,6 +33,8 @@ *

* This exception is seen by the execution engine, but not seen by * the end user nor through the JShell API. + * + * @since 9 */ @SuppressWarnings("serial") // serialVersionUID intentionally omitted public class SPIResolutionException extends RuntimeException { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java Fri Feb 10 11:34:16 2017 -0800 @@ -66,6 +66,7 @@ *

  • failover:1(jdi),2(jdi:launch(true),timeout(3000)),3(local)
  • * * + * @since 9 * @see jdk.jshell.execution for execution implementation support */ package jdk.jshell.spi; diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java --- a/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java Fri Feb 10 11:34:16 2017 -0800 @@ -40,6 +40,8 @@ * configuration methods have sensible defaults which will be used if they are * not called.. After zero or more calls to configuration methods, the tool is * launched with a call to {@link #run(java.lang.String...) }. + * + * @since 9 */ public interface JavaShellToolBuilder { diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java --- a/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java Fri Feb 10 11:34:16 2017 -0800 @@ -47,6 +47,8 @@ * .run("--feedback", "silent", "MyStart"); * } * + * + * @since 9 */ diff -r 3e4d400638e5 src/jdk.jshell/share/classes/module-info.java --- a/src/jdk.jshell/share/classes/module-info.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/module-info.java Fri Feb 10 11:34:16 2017 -0800 @@ -51,6 +51,8 @@ * independent, operate at different levels, and do not share functionality or * definitions. *

    + * + * @since 9 */ module jdk.jshell { requires transitive java.compiler; From jonathan.gibbons at oracle.com Fri Feb 10 20:27:06 2017 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Fri, 10 Feb 2017 12:27:06 -0800 Subject: RFR 8174762: JShell: @since tags missing In-Reply-To: <589E1805.5050604@oracle.com> References: <589E1805.5050604@oracle.com> Message-ID: <5935f686-eb21-8835-a7d2-1ccf7fe6b342@oracle.com> I agree that reviewing the diffs is easier. The @since tags look OK, but in a couple of places, you've changed classes from public to package-private. That does not seem to be implied by the bug description. Is this intentional and covered by a CCC? --- a/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java Fri Feb 10 07:50:55 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java Fri Feb 10 11:34:16 2017 -0800 @@ -32,7 +32,7 @@ * The outer wrap for a set of snippets wrapped in a generated class * @author Robert Field */ -public class OuterImportSnippetWrap extends OuterWrap { +class OuterImportSnippetWrap extends OuterWrap { -- Jon On 2/10/17 11:44 AM, Robert Field wrote: > Please review.... > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8174762 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8174762v0.webrev/ > > I just self-reviewed using the webrev, and now my fingers are cramped ;-) > > Probably easier to review "hg diff" below ... > > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java > Fri Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -45,6 +45,8 @@ > * DeclarationSnippet is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > + * @since 9 > */ > public abstract class DeclarationSnippet extends PersistentSnippet { > > diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/Diag.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Fri Feb 10 > 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Fri Feb 10 > 11:34:16 2017 -0800 > @@ -30,6 +30,8 @@ > > /** > * Diagnostic information for a Snippet. > + * > + * @since 9 > * @see jdk.jshell.JShell#diagnostics(jdk.jshell.Snippet) > */ > public abstract class Diag { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java > Fri Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -34,6 +34,8 @@ > * ErroneousSnippet is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > + * @since 9 > */ > public class ErroneousSnippet extends Snippet { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/EvalException.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java Fri > Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java Fri > Feb 10 11:34:16 2017 -0800 > @@ -38,6 +38,8 @@ > * the Snippet id and for snippets without a method name (for example an > * expression) StackTraceElement.getMethodName() will be > the > * empty string. > + * > + * @since 9 > */ > @SuppressWarnings("serial") // serialVersionUID > intentionally omitted > public class EvalException extends JShellException { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java > Fri Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -34,6 +34,8 @@ > * ExpressionSnippet is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > + * @since 9 > * @jls 15: Expression. > */ > public class ExpressionSnippet extends Snippet { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java Fri > Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java Fri > Feb 10 11:34:16 2017 -0800 > @@ -34,6 +34,8 @@ > * {@code ImportSnippet} is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > + * @since 9 > * @jls 8.3: importDeclaration. > */ > public class ImportSnippet extends PersistentSnippet { > diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/JShell.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/JShell.java Fri Feb 10 > 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/JShell.java Fri Feb 10 > 11:34:16 2017 -0800 > @@ -79,7 +79,9 @@ > *

    > * This class is not thread safe, except as noted, all access should > be through > * a single thread. > + * > * @author Robert Field > + * @since 9 > */ > public class JShell implements AutoCloseable { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/JShellException.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java Fri > Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java Fri > Feb 10 11:34:16 2017 -0800 > @@ -27,6 +27,8 @@ > > /** > * The superclass of JShell generated exceptions > + * > + * @since 9 > */ > @SuppressWarnings("serial") // serialVersionUID > intentionally omitted > public class JShellException extends Exception { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java Fri > Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java Fri > Feb 10 11:34:16 2017 -0800 > @@ -35,6 +35,8 @@ > * MethodSnippet is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > + * @since 9 > * @jls 8.4: MethodDeclaration. > */ > public class MethodSnippet extends DeclarationSnippet { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -32,7 +32,7 @@ > * The outer wrap for a set of snippets wrapped in a generated class > * @author Robert Field > */ > -public class OuterImportSnippetWrap extends OuterWrap { > +class OuterImportSnippetWrap extends OuterWrap { > > private final Snippet snippet; > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -35,7 +35,7 @@ > * The outer wrap for a set of snippets wrapped in a generated class > * @author Robert Field > */ > -public class OuterSnippetsClassWrap extends OuterWrap { > +class OuterSnippetsClassWrap extends OuterWrap { > > private final String className; > private final LinkedHashMap wrapToSnippet; > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java Fri > Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java Fri > Feb 10 11:34:16 2017 -0800 > @@ -44,7 +44,7 @@ > * > * @author Robert Field > */ > -public class OuterWrapMap { > +class OuterWrapMap { > > private final JShell state; > private final Map classOuters = > new HashMap<>(); > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java > Fri Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -34,6 +34,8 @@ > * PersistentSnippet is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > + * @since 9 > */ > public abstract class PersistentSnippet extends Snippet { > > diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/Snippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java Fri Feb 10 > 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java Fri Feb 10 > 11:34:16 2017 -0800 > @@ -39,7 +39,9 @@ > * state engine, query {@code JShell} passing the Snippet. > *

    > * Because it is immutable, {@code Snippet} (and subclasses) is > thread-safe. > + * > * @author Robert Field > + * @since 9 > * @see jdk.jshell.JShell#status > */ > public abstract class Snippet { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java Fri > Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java Fri > Feb 10 11:34:16 2017 -0800 > @@ -38,7 +38,9 @@ > * {@code SnippetEvent} is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > * @author Robert Field > + * @since 9 > */ > public class SnippetEvent { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java > Fri Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -39,6 +39,7 @@ > * etc. > * Also includes completion suggestions, as might be used in > tab-completion. > * > + * @since 9 > */ > public abstract class SourceCodeAnalysis { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java > Fri Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -34,6 +34,8 @@ > * StatementSnippet is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > + * @since 9 > * @jls 14.5: Statement. > */ > public class StatementSnippet extends Snippet { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java Fri > Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java Fri > Feb 10 11:34:16 2017 -0800 > @@ -36,6 +36,8 @@ > * TypeDeclSnippet is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > + * @since 9 > */ > public class TypeDeclSnippet extends DeclarationSnippet { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -36,6 +36,8 @@ > * the Snippet id and for snippets without a method name (for example an > * expression) StackTraceElement.getName() will be the > * empty string. > + * > + * @since 9 > */ > @SuppressWarnings("serial") // serialVersionUID > intentionally omitted > public class UnresolvedReferenceException extends JShellException { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java Fri Feb > 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java Fri Feb > 10 11:34:16 2017 -0800 > @@ -35,6 +35,8 @@ > * VarSnippet is immutable: an access to > * any of its methods will always return the same result. > * and thus is thread-safe. > + * > + * @since 9 > * @jls 8.3: FieldDeclaration. > */ > public class VarSnippet extends DeclarationSnippet { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -39,6 +39,7 @@ > * > * @author Robert Field > * @author Jan Lahoda > + * @since 9 > */ > public class DirectExecutionControl implements ExecutionControl { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -37,6 +37,8 @@ > > /** > * Tries other providers in sequence until one works. > + * > + * @since 9 > */ > public class FailOverExecutionControlProvider implements > ExecutionControlProvider{ > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -61,6 +61,7 @@ > * > * @author Robert Field > * @author Jan Lahoda > + * @since 9 > */ > public class JdiDefaultExecutionControl extends JdiExecutionControl { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -37,7 +37,9 @@ > import static java.util.stream.Collectors.toMap; > > /** > - * Abstract JDI implementation of {@link > jdk.jshell.spi.ExecutionControl} > + * Abstract JDI implementation of {@link > jdk.jshell.spi.ExecutionControl}. > + * > + * @since 9 > */ > public abstract class JdiExecutionControl extends > StreamingExecutionControl implements ExecutionControl { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -35,7 +35,9 @@ > > /** > * A provider of remote JDI-controlled execution engines. > + * > * @author Robert Field > + * @since 9 > */ > public class JdiExecutionControlProvider implements > ExecutionControlProvider { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -47,6 +47,8 @@ > /** > * Sets up a JDI connection, providing the resulting JDI {@link > VirtualMachine} > * and the {@link Process} the remote agent is running in. > + * > + * @since 9 > */ > public class JdiInitiator { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -34,6 +34,8 @@ > * This interface specifies the loading specific subset of > * {@link jdk.jshell.spi.ExecutionControl}. For use in encapsulating > the > * {@link java.lang.ClassLoader} implementation. > + * > + * @since 9 > */ > public interface LoaderDelegate { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -33,6 +33,7 @@ > * in the same JVM as the JShell-core. > * > * @author Grigory Ptashko > + * @since 9 > */ > public class LocalExecutionControl extends DirectExecutionControl { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -32,7 +32,9 @@ > > /** > * A provider of execution engines which run in the same process as > JShell. > + * > * @author Robert Field > + * @since 9 > */ > public class LocalExecutionControlProvider implements > ExecutionControlProvider{ > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -45,6 +45,7 @@ > * > * @author Jan Lahoda > * @author Robert Field > + * @since 9 > */ > public class RemoteExecutionControl extends DirectExecutionControl > implements ExecutionControl { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -37,6 +37,7 @@ > * execution takes place. > * > * @author Robert Field > + * @since 9 > */ > public class StreamingExecutionControl implements ExecutionControl { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java Fri > Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java Fri > Feb 10 11:34:16 2017 -0800 > @@ -53,6 +53,7 @@ > * > * @author Jan Lahoda > * @author Robert Field > + * @since 9 > */ > public class Util { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -30,5 +30,7 @@ > * Also, provides related communication utilities. > * This package may be used to define alternative execution engines. > * The default JShell execution engine is included. > + * > + * @since 9 > */ > package jdk.jshell.execution; > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/package-info.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/package-info.java Fri > Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/package-info.java Fri > Feb 10 11:34:16 2017 -0800 > @@ -140,6 +140,8 @@ > * provide source boundary and completeness analysis to address cases > like > * those. SourceCodeAnalysis also provides suggested > completions > * of input, as might be used in tab-completion. > + * > + * @since 9 > */ > > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -45,6 +45,8 @@ > *

    > * Methods defined in this interface should only be called by the > core JShell > * implementation. > + * > + * @since 9 > */ > public interface ExecutionControl extends AutoCloseable { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -33,7 +33,9 @@ > * evaluate Snippets. Alternate execution engines can be created by > * implementing this interface, then configuring JShell with the > provider or > * the providers name and parameter specifier. > + * > * @author Robert Field > + * @since 9 > */ > public interface ExecutionControlProvider { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java > Fri Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -36,6 +36,7 @@ > * This interface is designed to provide the access to core JShell > functionality > * needed to implement ExecutionControl. > * > + * @since 9 > * @see ExecutionControl > */ > public interface ExecutionEnv { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -33,6 +33,8 @@ > *

    > * This exception is seen by the execution engine, but not seen by > * the end user nor through the JShell API. > + * > + * @since 9 > */ > @SuppressWarnings("serial") // serialVersionUID > intentionally omitted > public class SPIResolutionException extends RuntimeException { > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java > Fri Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -66,6 +66,7 @@ > *

  • failover:1(jdi),2(jdi:launch(true),timeout(3000)),3(local)
  • > * > * > + * @since 9 > * @see jdk.jshell.execution for execution implementation support > */ > package jdk.jshell.spi; > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java > --- > a/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -40,6 +40,8 @@ > * configuration methods have sensible defaults which will be used if > they are > * not called.. After zero or more calls to configuration methods, > the tool is > * launched with a call to {@link #run(java.lang.String...) }. > + * > + * @since 9 > */ > public interface JavaShellToolBuilder { > > diff -r 3e4d400638e5 > src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java > --- a/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java > Fri Feb 10 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -47,6 +47,8 @@ > * .run("--feedback", "silent", "MyStart"); > * } > * > + * > + * @since 9 > */ > > > diff -r 3e4d400638e5 src/jdk.jshell/share/classes/module-info.java > --- a/src/jdk.jshell/share/classes/module-info.java Fri Feb 10 > 07:50:55 2017 -0800 > +++ b/src/jdk.jshell/share/classes/module-info.java Fri Feb 10 > 11:34:16 2017 -0800 > @@ -51,6 +51,8 @@ > * independent, operate at different levels, and do not share > functionality or > * definitions. > *

    > + * > + * @since 9 > */ > module jdk.jshell { > requires transitive java.compiler; > > From robert.field at oracle.com Fri Feb 10 21:13:56 2017 From: robert.field at oracle.com (Robert Field) Date: Fri, 10 Feb 2017 13:13:56 -0800 Subject: RFR 8174762: JShell: @since tags missing In-Reply-To: <5935f686-eb21-8835-a7d2-1ccf7fe6b342@oracle.com> References: <589E1805.5050604@oracle.com> <5935f686-eb21-8835-a7d2-1ccf7fe6b342@oracle.com> Message-ID: <589E2D14.3040705@oracle.com> On 02/10/17 12:27, Jonathan Gibbons wrote: > I agree that reviewing the diffs is easier. > > The @since tags look OK, but in a couple of places, you've changed > classes from public to package-private. That does not seem to be > implied by the bug description. Is this intentional and covered by a > CCC? Thanks for reviewing Jon. Here is the bug description: All four JShell APIs/SPIs and the module have no @since tags. Also, three jdk.jshell classes are inadvertently public, and thus visible in the API (but unused and unusable): OuterImportSnippetWrap, OuterSnippetsClassWrap, and OuterWrapMap. Also, one class comment is missing its terminal period. The change from public to package-private is intentional. I caught these as a side-effect of checking every class. When these classes were added they inadvertently had public keywords (NetBeans default, just looked, can't find where to change that) so they never got CCC review to go in. And they never would have passed CCC as they make zero sense as part of the API (they aren't referenced nor can they be created within the API). I checked CCC. Somewhere between the initial 8043364 (where JShell was integrated into the JDK 9 repo) and next CCC 8139829 (a spec clean-up) they slipped in. Note ("Old API"): http://cr.openjdk.java.net/~rfield/old_jshell_api/ referenced in the latter CCC. -Robert > > > --- > a/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java > Fri Feb 10 07:50:55 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java > Fri Feb 10 11:34:16 2017 -0800 > @@ -32,7 +32,7 @@ > * The outer wrap for a set of snippets wrapped in a generated class > * @author Robert Field > */ > -public class OuterImportSnippetWrap extends OuterWrap { > +class OuterImportSnippetWrap extends OuterWrap { > > -- Jon > > > On 2/10/17 11:44 AM, Robert Field wrote: >> Please review.... >> >> Bug: >> >> https://bugs.openjdk.java.net/browse/JDK-8174762 >> >> Webrev: >> >> http://cr.openjdk.java.net/~rfield/8174762v0.webrev/ >> >> I just self-reviewed using the webrev, and now my fingers are cramped >> ;-) >> >> Probably easier to review "hg diff" below ... >> >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -45,6 +45,8 @@ >> * DeclarationSnippet is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> + * @since 9 >> */ >> public abstract class DeclarationSnippet extends PersistentSnippet { >> >> diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/Diag.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Fri Feb 10 >> 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Fri Feb 10 >> 11:34:16 2017 -0800 >> @@ -30,6 +30,8 @@ >> >> /** >> * Diagnostic information for a Snippet. >> + * >> + * @since 9 >> * @see jdk.jshell.JShell#diagnostics(jdk.jshell.Snippet) >> */ >> public abstract class Diag { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -34,6 +34,8 @@ >> * ErroneousSnippet is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> + * @since 9 >> */ >> public class ErroneousSnippet extends Snippet { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/EvalException.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java Fri >> Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java Fri >> Feb 10 11:34:16 2017 -0800 >> @@ -38,6 +38,8 @@ >> * the Snippet id and for snippets without a method name (for >> example an >> * expression) StackTraceElement.getMethodName() will >> be the >> * empty string. >> + * >> + * @since 9 >> */ >> @SuppressWarnings("serial") // serialVersionUID >> intentionally omitted >> public class EvalException extends JShellException { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -34,6 +34,8 @@ >> * ExpressionSnippet is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> + * @since 9 >> * @jls 15: Expression. >> */ >> public class ExpressionSnippet extends Snippet { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java Fri >> Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java Fri >> Feb 10 11:34:16 2017 -0800 >> @@ -34,6 +34,8 @@ >> * {@code ImportSnippet} is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> + * @since 9 >> * @jls 8.3: importDeclaration. >> */ >> public class ImportSnippet extends PersistentSnippet { >> diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/JShell.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/JShell.java Fri Feb 10 >> 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/JShell.java Fri Feb 10 >> 11:34:16 2017 -0800 >> @@ -79,7 +79,9 @@ >> *

    >> * This class is not thread safe, except as noted, all access should >> be through >> * a single thread. >> + * >> * @author Robert Field >> + * @since 9 >> */ >> public class JShell implements AutoCloseable { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/JShellException.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -27,6 +27,8 @@ >> >> /** >> * The superclass of JShell generated exceptions >> + * >> + * @since 9 >> */ >> @SuppressWarnings("serial") // serialVersionUID >> intentionally omitted >> public class JShellException extends Exception { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java Fri >> Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java Fri >> Feb 10 11:34:16 2017 -0800 >> @@ -35,6 +35,8 @@ >> * MethodSnippet is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> + * @since 9 >> * @jls 8.4: MethodDeclaration. >> */ >> public class MethodSnippet extends DeclarationSnippet { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -32,7 +32,7 @@ >> * The outer wrap for a set of snippets wrapped in a generated class >> * @author Robert Field >> */ >> -public class OuterImportSnippetWrap extends OuterWrap { >> +class OuterImportSnippetWrap extends OuterWrap { >> >> private final Snippet snippet; >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -35,7 +35,7 @@ >> * The outer wrap for a set of snippets wrapped in a generated class >> * @author Robert Field >> */ >> -public class OuterSnippetsClassWrap extends OuterWrap { >> +class OuterSnippetsClassWrap extends OuterWrap { >> >> private final String className; >> private final LinkedHashMap wrapToSnippet; >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java Fri >> Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java Fri >> Feb 10 11:34:16 2017 -0800 >> @@ -44,7 +44,7 @@ >> * >> * @author Robert Field >> */ >> -public class OuterWrapMap { >> +class OuterWrapMap { >> >> private final JShell state; >> private final Map classOuters = >> new HashMap<>(); >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -34,6 +34,8 @@ >> * PersistentSnippet is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> + * @since 9 >> */ >> public abstract class PersistentSnippet extends Snippet { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/Snippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java Fri Feb 10 >> 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java Fri Feb 10 >> 11:34:16 2017 -0800 >> @@ -39,7 +39,9 @@ >> * state engine, query {@code JShell} passing the Snippet. >> *

    >> * Because it is immutable, {@code Snippet} (and subclasses) is >> thread-safe. >> + * >> * @author Robert Field >> + * @since 9 >> * @see jdk.jshell.JShell#status >> */ >> public abstract class Snippet { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java Fri >> Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java Fri >> Feb 10 11:34:16 2017 -0800 >> @@ -38,7 +38,9 @@ >> * {@code SnippetEvent} is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> * @author Robert Field >> + * @since 9 >> */ >> public class SnippetEvent { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -39,6 +39,7 @@ >> * etc. >> * Also includes completion suggestions, as might be used in >> tab-completion. >> * >> + * @since 9 >> */ >> public abstract class SourceCodeAnalysis { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -34,6 +34,8 @@ >> * StatementSnippet is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> + * @since 9 >> * @jls 14.5: Statement. >> */ >> public class StatementSnippet extends Snippet { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -36,6 +36,8 @@ >> * TypeDeclSnippet is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> + * @since 9 >> */ >> public class TypeDeclSnippet extends DeclarationSnippet { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -36,6 +36,8 @@ >> * the Snippet id and for snippets without a method name (for >> example an >> * expression) StackTraceElement.getName() will be the >> * empty string. >> + * >> + * @since 9 >> */ >> @SuppressWarnings("serial") // serialVersionUID >> intentionally omitted >> public class UnresolvedReferenceException extends JShellException { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java Fri Feb >> 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java Fri Feb >> 10 11:34:16 2017 -0800 >> @@ -35,6 +35,8 @@ >> * VarSnippet is immutable: an access to >> * any of its methods will always return the same result. >> * and thus is thread-safe. >> + * >> + * @since 9 >> * @jls 8.3: FieldDeclaration. >> */ >> public class VarSnippet extends DeclarationSnippet { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -39,6 +39,7 @@ >> * >> * @author Robert Field >> * @author Jan Lahoda >> + * @since 9 >> */ >> public class DirectExecutionControl implements ExecutionControl { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -37,6 +37,8 @@ >> >> /** >> * Tries other providers in sequence until one works. >> + * >> + * @since 9 >> */ >> public class FailOverExecutionControlProvider implements >> ExecutionControlProvider{ >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -61,6 +61,7 @@ >> * >> * @author Robert Field >> * @author Jan Lahoda >> + * @since 9 >> */ >> public class JdiDefaultExecutionControl extends JdiExecutionControl { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -37,7 +37,9 @@ >> import static java.util.stream.Collectors.toMap; >> >> /** >> - * Abstract JDI implementation of {@link >> jdk.jshell.spi.ExecutionControl} >> + * Abstract JDI implementation of {@link >> jdk.jshell.spi.ExecutionControl}. >> + * >> + * @since 9 >> */ >> public abstract class JdiExecutionControl extends >> StreamingExecutionControl implements ExecutionControl { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -35,7 +35,9 @@ >> >> /** >> * A provider of remote JDI-controlled execution engines. >> + * >> * @author Robert Field >> + * @since 9 >> */ >> public class JdiExecutionControlProvider implements >> ExecutionControlProvider { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -47,6 +47,8 @@ >> /** >> * Sets up a JDI connection, providing the resulting JDI {@link >> VirtualMachine} >> * and the {@link Process} the remote agent is running in. >> + * >> + * @since 9 >> */ >> public class JdiInitiator { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -34,6 +34,8 @@ >> * This interface specifies the loading specific subset of >> * {@link jdk.jshell.spi.ExecutionControl}. For use in >> encapsulating the >> * {@link java.lang.ClassLoader} implementation. >> + * >> + * @since 9 >> */ >> public interface LoaderDelegate { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -33,6 +33,7 @@ >> * in the same JVM as the JShell-core. >> * >> * @author Grigory Ptashko >> + * @since 9 >> */ >> public class LocalExecutionControl extends DirectExecutionControl { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -32,7 +32,9 @@ >> >> /** >> * A provider of execution engines which run in the same process as >> JShell. >> + * >> * @author Robert Field >> + * @since 9 >> */ >> public class LocalExecutionControlProvider implements >> ExecutionControlProvider{ >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -45,6 +45,7 @@ >> * >> * @author Jan Lahoda >> * @author Robert Field >> + * @since 9 >> */ >> public class RemoteExecutionControl extends DirectExecutionControl >> implements ExecutionControl { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -37,6 +37,7 @@ >> * execution takes place. >> * >> * @author Robert Field >> + * @since 9 >> */ >> public class StreamingExecutionControl implements ExecutionControl { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java Fri >> Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java Fri >> Feb 10 11:34:16 2017 -0800 >> @@ -53,6 +53,7 @@ >> * >> * @author Jan Lahoda >> * @author Robert Field >> + * @since 9 >> */ >> public class Util { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -30,5 +30,7 @@ >> * Also, provides related communication utilities. >> * This package may be used to define alternative execution engines. >> * The default JShell execution engine is included. >> + * >> + * @since 9 >> */ >> package jdk.jshell.execution; >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/package-info.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/package-info.java Fri >> Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/package-info.java Fri >> Feb 10 11:34:16 2017 -0800 >> @@ -140,6 +140,8 @@ >> * provide source boundary and completeness analysis to address >> cases like >> * those. SourceCodeAnalysis also provides suggested >> completions >> * of input, as might be used in tab-completion. >> + * >> + * @since 9 >> */ >> >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -45,6 +45,8 @@ >> *

    >> * Methods defined in this interface should only be called by the >> core JShell >> * implementation. >> + * >> + * @since 9 >> */ >> public interface ExecutionControl extends AutoCloseable { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -33,7 +33,9 @@ >> * evaluate Snippets. Alternate execution engines can be created by >> * implementing this interface, then configuring JShell with the >> provider or >> * the providers name and parameter specifier. >> + * >> * @author Robert Field >> + * @since 9 >> */ >> public interface ExecutionControlProvider { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -36,6 +36,7 @@ >> * This interface is designed to provide the access to core JShell >> functionality >> * needed to implement ExecutionControl. >> * >> + * @since 9 >> * @see ExecutionControl >> */ >> public interface ExecutionEnv { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -33,6 +33,8 @@ >> *

    >> * This exception is seen by the execution engine, but not seen by >> * the end user nor through the JShell API. >> + * >> + * @since 9 >> */ >> @SuppressWarnings("serial") // serialVersionUID >> intentionally omitted >> public class SPIResolutionException extends RuntimeException { >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -66,6 +66,7 @@ >> *

  • failover:1(jdi),2(jdi:launch(true),timeout(3000)),3(local)
  • >> * >> * >> + * @since 9 >> * @see jdk.jshell.execution for execution implementation support >> */ >> package jdk.jshell.spi; >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -40,6 +40,8 @@ >> * configuration methods have sensible defaults which will be used >> if they are >> * not called.. After zero or more calls to configuration methods, >> the tool is >> * launched with a call to {@link #run(java.lang.String...) }. >> + * >> + * @since 9 >> */ >> public interface JavaShellToolBuilder { >> >> diff -r 3e4d400638e5 >> src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java >> --- a/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -47,6 +47,8 @@ >> * .run("--feedback", "silent", "MyStart"); >> * } >> * >> + * >> + * @since 9 >> */ >> >> >> diff -r 3e4d400638e5 src/jdk.jshell/share/classes/module-info.java >> --- a/src/jdk.jshell/share/classes/module-info.java Fri Feb 10 >> 07:50:55 2017 -0800 >> +++ b/src/jdk.jshell/share/classes/module-info.java Fri Feb 10 >> 11:34:16 2017 -0800 >> @@ -51,6 +51,8 @@ >> * independent, operate at different levels, and do not share >> functionality or >> * definitions. >> *

    >> + * >> + * @since 9 >> */ >> module jdk.jshell { >> requires transitive java.compiler; >> >> > From jonathan.gibbons at oracle.com Fri Feb 10 21:38:28 2017 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Fri, 10 Feb 2017 13:38:28 -0800 Subject: RFR 8174762: JShell: @since tags missing In-Reply-To: <589E2D14.3040705@oracle.com> References: <589E1805.5050604@oracle.com> <5935f686-eb21-8835-a7d2-1ccf7fe6b342@oracle.com> <589E2D14.3040705@oracle.com> Message-ID: <589E32D4.9040003@oracle.com> If the classes you're de-publicizing have never gone through CCC, I guess it is a reasonable bug fix to do-publicize them. Thanks for posting the bug description. For my part, the patch looks good to me. -- Jon On 02/10/2017 01:13 PM, Robert Field wrote: > On 02/10/17 12:27, Jonathan Gibbons wrote: >> I agree that reviewing the diffs is easier. >> >> The @since tags look OK, but in a couple of places, you've changed >> classes from public to package-private. That does not seem to be >> implied by the bug description. Is this intentional and covered by a >> CCC? > > Thanks for reviewing Jon. > > Here is the bug description: > > All four JShell APIs/SPIs and the module have no @since tags. > > Also, three jdk.jshell classes are inadvertently public, and > thus visible in the API (but unused and unusable): > OuterImportSnippetWrap, OuterSnippetsClassWrap, and OuterWrapMap. > > Also, one class comment is missing its terminal period. > > The change from public to package-private is intentional. I caught > these as a side-effect of checking every class. > > When these classes were added they inadvertently had public keywords > (NetBeans default, just looked, can't find where to change that) so > they never got CCC review to go in. And they never would have passed > CCC as they make zero sense as part of the API (they aren't referenced > nor can they be created within the API). > > I checked CCC. Somewhere between the initial 8043364 (where JShell > was integrated into the JDK 9 repo) and next CCC 8139829 (a spec > clean-up) they slipped in. Note ("Old API"): > > http://cr.openjdk.java.net/~rfield/old_jshell_api/ > > referenced in the latter CCC. > > -Robert > > >> >> >> --- >> a/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java >> Fri Feb 10 07:50:55 2017 -0800 >> +++ >> b/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java >> Fri Feb 10 11:34:16 2017 -0800 >> @@ -32,7 +32,7 @@ >> * The outer wrap for a set of snippets wrapped in a generated class >> * @author Robert Field >> */ >> -public class OuterImportSnippetWrap extends OuterWrap { >> +class OuterImportSnippetWrap extends OuterWrap { >> >> -- Jon >> >> >> On 2/10/17 11:44 AM, Robert Field wrote: >>> Please review.... >>> >>> Bug: >>> >>> https://bugs.openjdk.java.net/browse/JDK-8174762 >>> >>> Webrev: >>> >>> http://cr.openjdk.java.net/~rfield/8174762v0.webrev/ >>> >>> I just self-reviewed using the webrev, and now my fingers are >>> cramped ;-) >>> >>> Probably easier to review "hg diff" below ... >>> >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -45,6 +45,8 @@ >>> * DeclarationSnippet is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> + * @since 9 >>> */ >>> public abstract class DeclarationSnippet extends PersistentSnippet { >>> >>> diff -r 3e4d400638e5 src/jdk.jshell/share/classes/jdk/jshell/Diag.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Fri Feb 10 >>> 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/Diag.java Fri Feb 10 >>> 11:34:16 2017 -0800 >>> @@ -30,6 +30,8 @@ >>> >>> /** >>> * Diagnostic information for a Snippet. >>> + * >>> + * @since 9 >>> * @see jdk.jshell.JShell#diagnostics(jdk.jshell.Snippet) >>> */ >>> public abstract class Diag { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -34,6 +34,8 @@ >>> * ErroneousSnippet is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> + * @since 9 >>> */ >>> public class ErroneousSnippet extends Snippet { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/EvalException.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/EvalException.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -38,6 +38,8 @@ >>> * the Snippet id and for snippets without a method name (for >>> example an >>> * expression) StackTraceElement.getMethodName() will >>> be the >>> * empty string. >>> + * >>> + * @since 9 >>> */ >>> @SuppressWarnings("serial") // serialVersionUID >>> intentionally omitted >>> public class EvalException extends JShellException { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -34,6 +34,8 @@ >>> * ExpressionSnippet is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> + * @since 9 >>> * @jls 15: Expression. >>> */ >>> public class ExpressionSnippet extends Snippet { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -34,6 +34,8 @@ >>> * {@code ImportSnippet} is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> + * @since 9 >>> * @jls 8.3: importDeclaration. >>> */ >>> public class ImportSnippet extends PersistentSnippet { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/JShell.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/JShell.java Fri Feb 10 >>> 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/JShell.java Fri Feb 10 >>> 11:34:16 2017 -0800 >>> @@ -79,7 +79,9 @@ >>> *

    >>> * This class is not thread safe, except as noted, all access >>> should be through >>> * a single thread. >>> + * >>> * @author Robert Field >>> + * @since 9 >>> */ >>> public class JShell implements AutoCloseable { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/JShellException.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/JShellException.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -27,6 +27,8 @@ >>> >>> /** >>> * The superclass of JShell generated exceptions >>> + * >>> + * @since 9 >>> */ >>> @SuppressWarnings("serial") // serialVersionUID >>> intentionally omitted >>> public class JShellException extends Exception { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -35,6 +35,8 @@ >>> * MethodSnippet is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> + * @since 9 >>> * @jls 8.4: MethodDeclaration. >>> */ >>> public class MethodSnippet extends DeclarationSnippet { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -32,7 +32,7 @@ >>> * The outer wrap for a set of snippets wrapped in a generated class >>> * @author Robert Field >>> */ >>> -public class OuterImportSnippetWrap extends OuterWrap { >>> +class OuterImportSnippetWrap extends OuterWrap { >>> >>> private final Snippet snippet; >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/OuterSnippetsClassWrap.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -35,7 +35,7 @@ >>> * The outer wrap for a set of snippets wrapped in a generated class >>> * @author Robert Field >>> */ >>> -public class OuterSnippetsClassWrap extends OuterWrap { >>> +class OuterSnippetsClassWrap extends OuterWrap { >>> >>> private final String className; >>> private final LinkedHashMap wrapToSnippet; >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/OuterWrapMap.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -44,7 +44,7 @@ >>> * >>> * @author Robert Field >>> */ >>> -public class OuterWrapMap { >>> +class OuterWrapMap { >>> >>> private final JShell state; >>> private final Map classOuters = >>> new HashMap<>(); >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -34,6 +34,8 @@ >>> * PersistentSnippet is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> + * @since 9 >>> */ >>> public abstract class PersistentSnippet extends Snippet { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/Snippet.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java Fri Feb >>> 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java Fri Feb >>> 10 11:34:16 2017 -0800 >>> @@ -39,7 +39,9 @@ >>> * state engine, query {@code JShell} passing the Snippet. >>> *

    >>> * Because it is immutable, {@code Snippet} (and subclasses) is >>> thread-safe. >>> + * >>> * @author Robert Field >>> + * @since 9 >>> * @see jdk.jshell.JShell#status >>> */ >>> public abstract class Snippet { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/SnippetEvent.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -38,7 +38,9 @@ >>> * {@code SnippetEvent} is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> * @author Robert Field >>> + * @since 9 >>> */ >>> public class SnippetEvent { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -39,6 +39,7 @@ >>> * etc. >>> * Also includes completion suggestions, as might be used in >>> tab-completion. >>> * >>> + * @since 9 >>> */ >>> public abstract class SourceCodeAnalysis { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -34,6 +34,8 @@ >>> * StatementSnippet is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> + * @since 9 >>> * @jls 14.5: Statement. >>> */ >>> public class StatementSnippet extends Snippet { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -36,6 +36,8 @@ >>> * TypeDeclSnippet is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> + * @since 9 >>> */ >>> public class TypeDeclSnippet extends DeclarationSnippet { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/UnresolvedReferenceException.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -36,6 +36,8 @@ >>> * the Snippet id and for snippets without a method name (for >>> example an >>> * expression) StackTraceElement.getName() will be the >>> * empty string. >>> + * >>> + * @since 9 >>> */ >>> @SuppressWarnings("serial") // serialVersionUID >>> intentionally omitted >>> public class UnresolvedReferenceException extends JShellException { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -35,6 +35,8 @@ >>> * VarSnippet is immutable: an access to >>> * any of its methods will always return the same result. >>> * and thus is thread-safe. >>> + * >>> + * @since 9 >>> * @jls 8.3: FieldDeclaration. >>> */ >>> public class VarSnippet extends DeclarationSnippet { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/DirectExecutionControl.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -39,6 +39,7 @@ >>> * >>> * @author Robert Field >>> * @author Jan Lahoda >>> + * @since 9 >>> */ >>> public class DirectExecutionControl implements ExecutionControl { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/FailOverExecutionControlProvider.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -37,6 +37,8 @@ >>> >>> /** >>> * Tries other providers in sequence until one works. >>> + * >>> + * @since 9 >>> */ >>> public class FailOverExecutionControlProvider implements >>> ExecutionControlProvider{ >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiDefaultExecutionControl.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -61,6 +61,7 @@ >>> * >>> * @author Robert Field >>> * @author Jan Lahoda >>> + * @since 9 >>> */ >>> public class JdiDefaultExecutionControl extends JdiExecutionControl { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControl.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -37,7 +37,9 @@ >>> import static java.util.stream.Collectors.toMap; >>> >>> /** >>> - * Abstract JDI implementation of {@link >>> jdk.jshell.spi.ExecutionControl} >>> + * Abstract JDI implementation of {@link >>> jdk.jshell.spi.ExecutionControl}. >>> + * >>> + * @since 9 >>> */ >>> public abstract class JdiExecutionControl extends >>> StreamingExecutionControl implements ExecutionControl { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiExecutionControlProvider.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -35,7 +35,9 @@ >>> >>> /** >>> * A provider of remote JDI-controlled execution engines. >>> + * >>> * @author Robert Field >>> + * @since 9 >>> */ >>> public class JdiExecutionControlProvider implements >>> ExecutionControlProvider { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/JdiInitiator.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -47,6 +47,8 @@ >>> /** >>> * Sets up a JDI connection, providing the resulting JDI {@link >>> VirtualMachine} >>> * and the {@link Process} the remote agent is running in. >>> + * >>> + * @since 9 >>> */ >>> public class JdiInitiator { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/LoaderDelegate.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -34,6 +34,8 @@ >>> * This interface specifies the loading specific subset of >>> * {@link jdk.jshell.spi.ExecutionControl}. For use in >>> encapsulating the >>> * {@link java.lang.ClassLoader} implementation. >>> + * >>> + * @since 9 >>> */ >>> public interface LoaderDelegate { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -33,6 +33,7 @@ >>> * in the same JVM as the JShell-core. >>> * >>> * @author Grigory Ptashko >>> + * @since 9 >>> */ >>> public class LocalExecutionControl extends DirectExecutionControl { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControlProvider.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -32,7 +32,9 @@ >>> >>> /** >>> * A provider of execution engines which run in the same process as >>> JShell. >>> + * >>> * @author Robert Field >>> + * @since 9 >>> */ >>> public class LocalExecutionControlProvider implements >>> ExecutionControlProvider{ >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -45,6 +45,7 @@ >>> * >>> * @author Jan Lahoda >>> * @author Robert Field >>> + * @since 9 >>> */ >>> public class RemoteExecutionControl extends DirectExecutionControl >>> implements ExecutionControl { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/StreamingExecutionControl.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -37,6 +37,7 @@ >>> * execution takes place. >>> * >>> * @author Robert Field >>> + * @since 9 >>> */ >>> public class StreamingExecutionControl implements ExecutionControl { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -53,6 +53,7 @@ >>> * >>> * @author Jan Lahoda >>> * @author Robert Field >>> + * @since 9 >>> */ >>> public class Util { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/execution/package-info.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -30,5 +30,7 @@ >>> * Also, provides related communication utilities. >>> * This package may be used to define alternative execution engines. >>> * The default JShell execution engine is included. >>> + * >>> + * @since 9 >>> */ >>> package jdk.jshell.execution; >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/package-info.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/package-info.java Fri >>> Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/package-info.java Fri >>> Feb 10 11:34:16 2017 -0800 >>> @@ -140,6 +140,8 @@ >>> * provide source boundary and completeness analysis to address >>> cases like >>> * those. SourceCodeAnalysis also provides suggested >>> completions >>> * of input, as might be used in tab-completion. >>> + * >>> + * @since 9 >>> */ >>> >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControl.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -45,6 +45,8 @@ >>> *

    >>> * Methods defined in this interface should only be called by the >>> core JShell >>> * implementation. >>> + * >>> + * @since 9 >>> */ >>> public interface ExecutionControl extends AutoCloseable { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -33,7 +33,9 @@ >>> * evaluate Snippets. Alternate execution engines can be created by >>> * implementing this interface, then configuring JShell with the >>> provider or >>> * the providers name and parameter specifier. >>> + * >>> * @author Robert Field >>> + * @since 9 >>> */ >>> public interface ExecutionControlProvider { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -36,6 +36,7 @@ >>> * This interface is designed to provide the access to core JShell >>> functionality >>> * needed to implement ExecutionControl. >>> * >>> + * @since 9 >>> * @see ExecutionControl >>> */ >>> public interface ExecutionEnv { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/spi/SPIResolutionException.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -33,6 +33,8 @@ >>> *

    >>> * This exception is seen by the execution engine, but not seen by >>> * the end user nor through the JShell API. >>> + * >>> + * @since 9 >>> */ >>> @SuppressWarnings("serial") // serialVersionUID >>> intentionally omitted >>> public class SPIResolutionException extends RuntimeException { >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -66,6 +66,7 @@ >>> *

  • failover:1(jdi),2(jdi:launch(true),timeout(3000)),3(local)
  • >>> * >>> * >>> + * @since 9 >>> * @see jdk.jshell.execution for execution implementation support >>> */ >>> package jdk.jshell.spi; >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java >>> --- >>> a/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ >>> b/src/jdk.jshell/share/classes/jdk/jshell/tool/JavaShellToolBuilder.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -40,6 +40,8 @@ >>> * configuration methods have sensible defaults which will be used >>> if they are >>> * not called.. After zero or more calls to configuration methods, >>> the tool is >>> * launched with a call to {@link #run(java.lang.String...) }. >>> + * >>> + * @since 9 >>> */ >>> public interface JavaShellToolBuilder { >>> >>> diff -r 3e4d400638e5 >>> src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java >>> --- a/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java >>> Fri Feb 10 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/jdk/jshell/tool/package-info.java >>> Fri Feb 10 11:34:16 2017 -0800 >>> @@ -47,6 +47,8 @@ >>> * .run("--feedback", "silent", "MyStart"); >>> * } >>> * >>> + * >>> + * @since 9 >>> */ >>> >>> >>> diff -r 3e4d400638e5 src/jdk.jshell/share/classes/module-info.java >>> --- a/src/jdk.jshell/share/classes/module-info.java Fri Feb 10 >>> 07:50:55 2017 -0800 >>> +++ b/src/jdk.jshell/share/classes/module-info.java Fri Feb 10 >>> 11:34:16 2017 -0800 >>> @@ -51,6 +51,8 @@ >>> * independent, operate at different levels, and do not share >>> functionality or >>> * definitions. >>> *

    >>> + * >>> + * @since 9 >>> */ >>> module jdk.jshell { >>> requires transitive java.compiler; >>> >>> >> > From michael.mueller at mueller-bruehl.de Sun Feb 12 15:03:41 2017 From: michael.mueller at mueller-bruehl.de (=?UTF-8?Q?Michael_M=c3=bcller?=) Date: Sun, 12 Feb 2017 16:03:41 +0100 Subject: classpath Message-ID: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> Hi, formerly I could use /classpath ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar | Path '~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ ParallelStreams.jar' added to classpath jshell> import de.muellerbruehl.parallelstreams.PersonManager SInce this has become /env, I have trouble with it: jshell> /env -class-path ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar | Setting new options and restoring state. jshell> /env | --class-path ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar jshell> import de.muellerbruehl.parallelstreams.PersonManager | Error: | package de.muellerbruehl.parallelstreams does not exist | import de.muellerbruehl.parallelstreams.PersonManager; | ^--------------------------------------------^ Although /env displays the added classpath, it is not recognized. To add a classpath, I have to leave the shell and restart it with the classpath option. And btw. the doc states a directory will be accepted as classpath. But I always have to add the fully qualified name of the jar. The directory only does not work :( -- Herzliche Gr??e - Best Regards, Michael M?ller Br?hl, Germany blog.mueller-bruehl.de it-rezension.de @muellermi Read my books "Web Development with Java and JSF": https://leanpub.com/jsf "Java Lambdas and Parallel Streams": http://www.apress.com/de/book/9781484224861 "Visitors" a photographic image book: https://leanpub.com/visitors From ecki at zusammenkunft.net Sun Feb 12 16:56:45 2017 From: ecki at zusammenkunft.net (Bernd Eckenfels) Date: Sun, 12 Feb 2017 16:56:45 +0000 (UTC) Subject: classpath In-Reply-To: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> References: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> Message-ID: <2C80812C54F23E38.180AC693-D46D-4127-9CF4-E511D6EA14EC@mail.outlook.com> Hello, I guess "directory" refers to a exploded class hierarchy containing .class files as with the java launcher it does not observer .jar files. Maybe that could be described in the doc more explicitly. Gruss Bernd -- http://bernd.eckenfels.net On Sun, Feb 12, 2017 at 4:03 PM +0100, "Michael M?ller" wrote: Hi, formerly I could use /classpath ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar | Path '~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ ParallelStreams.jar' added to classpath jshell> import de.muellerbruehl.parallelstreams.PersonManager SInce this has become /env, I have trouble with it: jshell> /env -class-path ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar | Setting new options and restoring state. jshell> /env | --class-path ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar jshell> import de.muellerbruehl.parallelstreams.PersonManager | Error: | package de.muellerbruehl.parallelstreams does not exist | import de.muellerbruehl.parallelstreams.PersonManager; | ^--------------------------------------------^ Although /env displays the added classpath, it is not recognized. To add a classpath, I have to leave the shell and restart it with the classpath option. And btw. the doc states a directory will be accepted as classpath. But I always have to add the fully qualified name of the jar. The directory only does not work :( -- Herzliche Gr??e - Best Regards, Michael M?ller Br?hl, Germany blog.mueller-bruehl.de it-rezension.de @muellermi Read my books "Web Development with Java and JSF": https://leanpub.com/jsf "Java Lambdas and Parallel Streams": http://www.apress.com/de/book/9781484224861 "Visitors" a photographic image book: https://leanpub.com/visitors From robert.field at oracle.com Sun Feb 12 18:47:16 2017 From: robert.field at oracle.com (Robert Field) Date: Sun, 12 Feb 2017 10:47:16 -0800 Subject: classpath In-Reply-To: <2C80812C54F23E38.180AC693-D46D-4127-9CF4-E511D6EA14EC@mail.outlook.com> References: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> <2C80812C54F23E38.180AC693-D46D-4127-9CF4-E511D6EA14EC@mail.outlook.com> Message-ID: <58A0ADB4.1070000@oracle.com> On 02/12/17 08:56, Bernd Eckenfels wrote: > Hello, > I guess "directory" refers to a exploded class hierarchy containing .class files as with the java launcher it does not observer .jar files. That is correct, Bernd. > Maybe that could be described in the doc more explicitly. OK, I've added a section (to be filled) in the tutorial I'm writing. Thanks, Robert > > Gruss > Bernd From peter.levart at gmail.com Sun Feb 12 20:57:34 2017 From: peter.levart at gmail.com (Peter Levart) Date: Sun, 12 Feb 2017 21:57:34 +0100 Subject: classpath In-Reply-To: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> References: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> Message-ID: <1d4fac9a-363a-ebff-bf2f-650cf9445e9a@gmail.com> Hi, On 02/12/2017 04:03 PM, Michael M?ller wrote: > Hi, > > > formerly I could use > > /classpath > ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar > > | Path '~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ > ParallelStreams.jar' added to classpath > jshell> import de.muellerbruehl.parallelstreams.PersonManager > > > SInce this has become /env, I have trouble with it: > > jshell> /env -class-path > ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar > | Setting new options and restoring state. > > jshell> /env > | --class-path > ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar > > jshell> import de.muellerbruehl.parallelstreams.PersonManager > | Error: > | package de.muellerbruehl.parallelstreams does not exist > | import de.muellerbruehl.parallelstreams.PersonManager; > | ^--------------------------------------------^ > > Although /env displays the added classpath, it is not recognized. > To add a classpath, I have to leave the shell and restart it with the > classpath option. > And btw. the doc states a directory will be accepted as classpath. But > I always have to add the fully qualified name of the jar. The > directory only does not work :( > The problem seems to be the tilde "~" character you used to specify the path to the jar file. For example: jshell> /env --class-path ~/JavaLibs/guava-21.0.jar | Setting new options and restoring state. jshell> /env | --class-path ~/JavaLibs/guava-21.0.jar jshell> import com.google.common.base.Function; | Error: | package com.google.common.base does not exist | import com.google.common.base.Function; | ^-----------------------------^ ...but... jshell> /env --class-path /home/peter/JavaLibs/guava-21.0.jar | Setting new options and restoring state. jshell> /env | --class-path /home/peter/JavaLibs/guava-21.0.jar jshell> import com.google.common.base.Function; jshell> The "tilde" character is usually expanded by a UNIX shell: bash$ echo ~ /home/peter ...but jshell seems to interpret it literally. Should jshell treat and expand /env arguments according to the rules of native shells on the corresponding platforms? For example, should it expand %VARIABLE% on Windows and ${VARIABLE} or $VARIABLE on UNIX-es ? Regards, Peter From peter.levart at gmail.com Sun Feb 12 21:09:53 2017 From: peter.levart at gmail.com (Peter Levart) Date: Sun, 12 Feb 2017 22:09:53 +0100 Subject: classpath In-Reply-To: <1d4fac9a-363a-ebff-bf2f-650cf9445e9a@gmail.com> References: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> <1d4fac9a-363a-ebff-bf2f-650cf9445e9a@gmail.com> Message-ID: On 02/12/2017 09:57 PM, Peter Levart wrote: > Should jshell treat and expand /env arguments according to the rules > of native shells on the corresponding platforms? For example, should > it expand %VARIABLE% on Windows and ${VARIABLE} or $VARIABLE on UNIX-es ? No, perhaps not. But it would perhaps be nice to have some kind of platform-independet way to expand either current Java system properties or process environment variables (or both) in arguments of jshell's slash-commands. So one could do for example: jshell> /env --class-path {user.home}/JavaLibs/guava-21.0.jar | Setting new options and restoring state. jshell> /env | --class-path /home/peter/JavaLibs/guava-21.0.jar Regards, Peter From robert.field at oracle.com Sun Feb 12 22:28:59 2017 From: robert.field at oracle.com (Robert Field) Date: Sun, 12 Feb 2017 14:28:59 -0800 Subject: RFR 8174797: jshell tool: invalid module path crashes tool Message-ID: <58A0E1AB.90205@oracle.com> Please review (ASAP).... Bugs: 8174797: jshell tool: invalid module path crashes tool https://bugs.openjdk.java.net/browse/JDK-8174797 8174796: jshell tool: regression: user home (tilde) not translated https://bugs.openjdk.java.net/browse/JDK-8174796 Webrev: http://cr.openjdk.java.net/~rfield/8174797v0.webrev/ Thanks, Robert From jan.lahoda at oracle.com Mon Feb 13 16:42:55 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Mon, 13 Feb 2017 17:42:55 +0100 Subject: RFR 8174797: jshell tool: invalid module path crashes tool In-Reply-To: <58A0E1AB.90205@oracle.com> References: <58A0E1AB.90205@oracle.com> Message-ID: <58A1E20F.8030805@oracle.com> Seems OK. Jan On 12.2.2017 23:28, Robert Field wrote: > Please review (ASAP).... > > Bugs: > > 8174797: jshell tool: invalid module path crashes tool > https://bugs.openjdk.java.net/browse/JDK-8174797 > > 8174796: jshell tool: regression: user home (tilde) not translated > https://bugs.openjdk.java.net/browse/JDK-8174796 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8174797v0.webrev/ > > Thanks, > Robert > From robert.field at oracle.com Mon Feb 13 19:45:36 2017 From: robert.field at oracle.com (Robert Field) Date: Mon, 13 Feb 2017 11:45:36 -0800 Subject: RFR (XXXS) 8174857: jshell tool: /help /set truncation -- confusing indentation Message-ID: <58A20CE0.6040501@oracle.com> There is tab ("\t") in the documentation for "/set truncation" that messes up the indentation, making the text harder to understand. Fix is to remove the tab. Please review.. Bug: https://bugs.openjdk.java.net/browse/JDK-8174857 Diff -- diff -r 39f31cef8e6a src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties --- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties Mon Feb 13 08:50:26 2017 -0800 +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties Mon Feb 13 11:34:54 2017 -0800 @@ -650,7 +650,7 @@ varinit -- variable declaration with init\n\t\ expression -- expression -- note: {name}==scratch-variable-name\n\t\ varvalue -- variable value expression\n\t\ - assignment -- assign variable\n\t\ + assignment -- assign variable\n\ The action selector kind describes what happened to the snippet. The values are:\n\t\ added -- snippet has been added\n\t\ modified -- an existing snippet has been modified\n\t\ From jonathan.gibbons at oracle.com Mon Feb 13 19:59:52 2017 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Mon, 13 Feb 2017 11:59:52 -0800 Subject: RFR (XXXS) 8174857: jshell tool: /help /set truncation -- confusing indentation In-Reply-To: <58A20CE0.6040501@oracle.com> References: <58A20CE0.6040501@oracle.com> Message-ID: <58A21038.7080806@oracle.com> Looks OK to me. -- Jon On 02/13/2017 11:45 AM, Robert Field wrote: > There is tab ("\t") in the documentation for "/set truncation" that > messes up the indentation, making the text harder to understand. > Fix is to remove the tab. > Please review.. > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8174857 > > Diff -- > > diff -r 39f31cef8e6a > src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties > --- > a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties > Mon Feb 13 08:50:26 2017 -0800 > +++ > b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties > Mon Feb 13 11:34:54 2017 -0800 > @@ -650,7 +650,7 @@ > varinit -- variable declaration with init\n\t\ > expression -- expression -- note: {name}==scratch-variable-name\n\t\ > varvalue -- variable value expression\n\t\ > - assignment -- assign variable\n\t\ > + assignment -- assign variable\n\ > The action selector kind describes what happened to the snippet. The > values are:\n\t\ > added -- snippet has been added\n\t\ > modified -- an existing snippet has been modified\n\t\ > From robert.field at oracle.com Mon Feb 13 21:14:33 2017 From: robert.field at oracle.com (Robert Field) Date: Mon, 13 Feb 2017 13:14:33 -0800 Subject: RFR (XXS) 8174862: JShell tests: new JDK-8174797 testInvalidClassPath fails on Windows Message-ID: <58A221B9.6060806@oracle.com> A new test uses a platform-dependent file separator ("/"). The test doesn't need a file separator. Fix is simply to remove it from command and expected resulting error. Second failure is just this same test inherited. Please review.... Bug: https://bugs.openjdk.java.net/browse/JDK-8174862 hg diff -- --- a/test/jdk/jshell/ToolSimpleTest.java Mon Feb 13 12:14:23 2017 -0800 +++ b/test/jdk/jshell/ToolSimpleTest.java Mon Feb 13 13:07:20 2017 -0800 @@ -214,8 +214,8 @@ @Test public void testInvalidClassPath() { test( - a -> assertCommand(a, "/env --class-path snurge/fusal", - "| File 'snurge/fusal' for '--class-path' is not found.") + a -> assertCommand(a, "/env --class-path snurgefusal", + "| File 'snurgefusal' for '--class-path' is not found.") ); } Thanks, Robert From jan.lahoda at oracle.com Mon Feb 13 21:30:19 2017 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Mon, 13 Feb 2017 22:30:19 +0100 Subject: RFR (XXS) 8174862: JShell tests: new JDK-8174797 testInvalidClassPath fails on Windows In-Reply-To: <58A221B9.6060806@oracle.com> References: <58A221B9.6060806@oracle.com> Message-ID: <58A2256B.5090404@oracle.com> Seems OK. Jan On 13.2.2017 22:14, Robert Field wrote: > A new test uses a platform-dependent file separator ("/"). The test > doesn't need a file separator. Fix is simply to remove it from command > and expected resulting error. > Second failure is just this same test inherited. > Please review.... > > Bug: > > https://bugs.openjdk.java.net/browse/JDK-8174862 > > hg diff -- > > --- a/test/jdk/jshell/ToolSimpleTest.java Mon Feb 13 12:14:23 2017 > -0800 > +++ b/test/jdk/jshell/ToolSimpleTest.java Mon Feb 13 13:07:20 2017 > -0800 > @@ -214,8 +214,8 @@ > @Test > public void testInvalidClassPath() { > test( > - a -> assertCommand(a, "/env --class-path snurge/fusal", > - "| File 'snurge/fusal' for '--class-path' is > not found.") > + a -> assertCommand(a, "/env --class-path snurgefusal", > + "| File 'snurgefusal' for '--class-path' is > not found.") > ); > } > > > > Thanks, > Robert > From michel.trudeau at oracle.com Tue Feb 14 17:55:20 2017 From: michel.trudeau at oracle.com (Michel Trudeau) Date: Tue, 14 Feb 2017 09:55:20 -0800 Subject: classpath In-Reply-To: References: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> <1d4fac9a-363a-ebff-bf2f-650cf9445e9a@gmail.com> Message-ID: <58A34488.9060400@oracle.com> I would go for such an improvement. Please file an RFE. -- Michel > Peter Levart > February 12, 2017 at 1:09 PM > > > > > No, perhaps not. But it would perhaps be nice to have some kind of > platform-independet way to expand either current Java system > properties or process environment variables (or both) in arguments of > jshell's slash-commands. So one could do for example: > > jshell> /env --class-path {user.home}/JavaLibs/guava-21.0.jar > | Setting new options and restoring state. > > jshell> /env > | --class-path /home/peter/JavaLibs/guava-21.0.jar > > > > Regards, Peter > > Peter Levart > February 12, 2017 at 12:57 PM > Hi, > > > > The problem seems to be the tilde "~" character you used to specify > the path to the jar file. For example: > > jshell> /env --class-path ~/JavaLibs/guava-21.0.jar > | Setting new options and restoring state. > > jshell> /env > | --class-path ~/JavaLibs/guava-21.0.jar > > jshell> import com.google.common.base.Function; > | Error: > | package com.google.common.base does not exist > | import com.google.common.base.Function; > | ^-----------------------------^ > > > ...but... > > jshell> /env --class-path /home/peter/JavaLibs/guava-21.0.jar > | Setting new options and restoring state. > > jshell> /env > | --class-path /home/peter/JavaLibs/guava-21.0.jar > > jshell> import com.google.common.base.Function; > > jshell> > > > The "tilde" character is usually expanded by a UNIX shell: > > bash$ echo ~ > /home/peter > > ...but jshell seems to interpret it literally. > > Should jshell treat and expand /env arguments according to the rules > of native shells on the corresponding platforms? For example, should > it expand %VARIABLE% on Windows and ${VARIABLE} or $VARIABLE on UNIX-es ? > > Regards, Peter > > Michael M?ller > February 12, 2017 at 7:03 AM > Hi, > > > formerly I could use > > /classpath > ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar > > | Path '~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ > ParallelStreams.jar' added to classpath > jshell> import de.muellerbruehl.parallelstreams.PersonManager > > > SInce this has become /env, I have trouble with it: > > jshell> /env -class-path > ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar > > | Setting new options and restoring state. > > jshell> /env > | --class-path > ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar > > > jshell> import de.muellerbruehl.parallelstreams.PersonManager > | Error: > | package de.muellerbruehl.parallelstreams does not exist > | import de.muellerbruehl.parallelstreams.PersonManager; > | ^--------------------------------------------^ > > Although /env displays the added classpath, it is not recognized. > To add a classpath, I have to leave the shell and restart it with the > classpath option. > And btw. the doc states a directory will be accepted as classpath. But > I always have to add the fully qualified name of the jar. The > directory only does not work :( > From robert.field at oracle.com Wed Feb 15 01:00:01 2017 From: robert.field at oracle.com (Robert Field) Date: Tue, 14 Feb 2017 19:00:01 -0600 Subject: classpath In-Reply-To: <58A34488.9060400@oracle.com> References: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> <1d4fac9a-363a-ebff-bf2f-650cf9445e9a@gmail.com> <58A34488.9060400@oracle.com> Message-ID: <15a3f20f950.2784.4011f3a8741ca2aabce58b8b81f42d24@oracle.com> ~/ works everywhere a filename can appear. So, you can now do jshell> /env --class-path ~/JavaLibs/guava-21.0.jar? Robert (under a volcano) On February 14, 2017 9:55:22 AM Michel Trudeau wrote: > I would go for such an improvement. Please file an RFE. > -- > Michel > > > >> Peter Levart >> February 12, 2017 at 1:09 PM >> >> >> >> >> No, perhaps not. But it would perhaps be nice to have some kind of >> platform-independet way to expand either current Java system >> properties or process environment variables (or both) in arguments of >> jshell's slash-commands. So one could do for example: >> >> jshell> /env --class-path {user.home}/JavaLibs/guava-21.0.jar >> | Setting new options and restoring state. >> >> jshell> /env >> | --class-path /home/peter/JavaLibs/guava-21.0.jar >> >> >> >> Regards, Peter >> >> Peter Levart >> February 12, 2017 at 12:57 PM >> Hi, >> >> >> >> The problem seems to be the tilde "~" character you used to specify >> the path to the jar file. For example: >> >> jshell> /env --class-path ~/JavaLibs/guava-21.0.jar >> | Setting new options and restoring state. >> >> jshell> /env >> | --class-path ~/JavaLibs/guava-21.0.jar >> >> jshell> import com.google.common.base.Function; >> | Error: >> | package com.google.common.base does not exist >> | import com.google.common.base.Function; >> | ^-----------------------------^ >> >> >> ...but... >> >> jshell> /env --class-path /home/peter/JavaLibs/guava-21.0.jar >> | Setting new options and restoring state. >> >> jshell> /env >> | --class-path /home/peter/JavaLibs/guava-21.0.jar >> >> jshell> import com.google.common.base.Function; >> >> jshell> >> >> >> The "tilde" character is usually expanded by a UNIX shell: >> >> bash$ echo ~ >> /home/peter >> >> ...but jshell seems to interpret it literally. >> >> Should jshell treat and expand /env arguments according to the rules >> of native shells on the corresponding platforms? For example, should >> it expand %VARIABLE% on Windows and ${VARIABLE} or $VARIABLE on UNIX-es ? >> >> Regards, Peter >> >> Michael M?ller >> February 12, 2017 at 7:03 AM >> Hi, >> >> >> formerly I could use >> >> /classpath >> ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar >> >> | Path '~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ >> ParallelStreams.jar' added to classpath >> jshell> import de.muellerbruehl.parallelstreams.PersonManager >> >> >> SInce this has become /env, I have trouble with it: >> >> jshell> /env -class-path >> ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar >> >> | Setting new options and restoring state. >> >> jshell> /env >> | --class-path >> ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar >> >> >> jshell> import de.muellerbruehl.parallelstreams.PersonManager >> | Error: >> | package de.muellerbruehl.parallelstreams does not exist >> | import de.muellerbruehl.parallelstreams.PersonManager; >> | ^--------------------------------------------^ >> >> Although /env displays the added classpath, it is not recognized. >> To add a classpath, I have to leave the shell and restart it with the >> classpath option. >> And btw. the doc states a directory will be accepted as classpath. But >> I always have to add the fully qualified name of the jar. The >> directory only does not work :( >> > From jonathan.gibbons at oracle.com Wed Feb 15 01:08:42 2017 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Tue, 14 Feb 2017 17:08:42 -0800 Subject: classpath In-Reply-To: <15a3f20f950.2784.4011f3a8741ca2aabce58b8b81f42d24@oracle.com> References: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> <1d4fac9a-363a-ebff-bf2f-650cf9445e9a@gmail.com> <58A34488.9060400@oracle.com> <15a3f20f950.2784.4011f3a8741ca2aabce58b8b81f42d24@oracle.com> Message-ID: <58A3AA1A.7010505@oracle.com> Get back to your volcano! -- Jon On 02/14/2017 05:00 PM, Robert Field wrote: > ~/ works everywhere a filename can appear. > > So, you can now do > > jshell> /env --class-path ~/JavaLibs/guava-21.0.jar > > Robert (under a volcano) > > > > > > On February 14, 2017 9:55:22 AM Michel Trudeau > wrote: > >> I would go for such an improvement. Please file an RFE. >> -- >> Michel >> >> >> >>> Peter Levart >>> February 12, 2017 at 1:09 PM >>> >>> >>> >>> >>> No, perhaps not. But it would perhaps be nice to have some kind of >>> platform-independet way to expand either current Java system >>> properties or process environment variables (or both) in arguments of >>> jshell's slash-commands. So one could do for example: >>> >>> jshell> /env --class-path {user.home}/JavaLibs/guava-21.0.jar >>> | Setting new options and restoring state. >>> >>> jshell> /env >>> | --class-path /home/peter/JavaLibs/guava-21.0.jar >>> >>> >>> >>> Regards, Peter >>> >>> Peter Levart >>> February 12, 2017 at 12:57 PM >>> Hi, >>> >>> >>> >>> The problem seems to be the tilde "~" character you used to specify >>> the path to the jar file. For example: >>> >>> jshell> /env --class-path ~/JavaLibs/guava-21.0.jar >>> | Setting new options and restoring state. >>> >>> jshell> /env >>> | --class-path ~/JavaLibs/guava-21.0.jar >>> >>> jshell> import com.google.common.base.Function; >>> | Error: >>> | package com.google.common.base does not exist >>> | import com.google.common.base.Function; >>> | ^-----------------------------^ >>> >>> >>> ...but... >>> >>> jshell> /env --class-path /home/peter/JavaLibs/guava-21.0.jar >>> | Setting new options and restoring state. >>> >>> jshell> /env >>> | --class-path /home/peter/JavaLibs/guava-21.0.jar >>> >>> jshell> import com.google.common.base.Function; >>> >>> jshell> >>> >>> >>> The "tilde" character is usually expanded by a UNIX shell: >>> >>> bash$ echo ~ >>> /home/peter >>> >>> ...but jshell seems to interpret it literally. >>> >>> Should jshell treat and expand /env arguments according to the rules >>> of native shells on the corresponding platforms? For example, should >>> it expand %VARIABLE% on Windows and ${VARIABLE} or $VARIABLE on >>> UNIX-es ? >>> >>> Regards, Peter >>> >>> Michael M?ller >>> February 12, 2017 at 7:03 AM >>> Hi, >>> >>> >>> formerly I could use >>> >>> /classpath >>> ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar >>> >>> >>> | Path '~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ >>> ParallelStreams.jar' added to classpath >>> jshell> import de.muellerbruehl.parallelstreams.PersonManager >>> >>> >>> SInce this has become /env, I have trouble with it: >>> >>> jshell> /env -class-path >>> ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar >>> >>> >>> | Setting new options and restoring state. >>> >>> jshell> /env >>> | --class-path >>> ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar >>> >>> >>> >>> jshell> import de.muellerbruehl.parallelstreams.PersonManager >>> | Error: >>> | package de.muellerbruehl.parallelstreams does not exist >>> | import de.muellerbruehl.parallelstreams.PersonManager; >>> | ^--------------------------------------------^ >>> >>> Although /env displays the added classpath, it is not recognized. >>> To add a classpath, I have to leave the shell and restart it with the >>> classpath option. >>> And btw. the doc states a directory will be accepted as classpath. But >>> I always have to add the fully qualified name of the jar. The >>> directory only does not work :( >>> >> From robert.field at oracle.com Wed Feb 15 01:30:18 2017 From: robert.field at oracle.com (Robert Field) Date: Tue, 14 Feb 2017 19:30:18 -0600 Subject: classpath In-Reply-To: <58A3AA1A.7010505@oracle.com> References: <3b824c1a-a0c2-6a43-af0e-451d6f3c36c2@mueller-bruehl.de> <1d4fac9a-363a-ebff-bf2f-650cf9445e9a@gmail.com> <58A34488.9060400@oracle.com> <15a3f20f950.2784.4011f3a8741ca2aabce58b8b81f42d24@oracle.com> <58A3AA1A.7010505@oracle.com> Message-ID: <15a3f5aaec0.2784.4011f3a8741ca2aabce58b8b81f42d24@oracle.com> OK, but it is a little hard to see right now ;-) On February 14, 2017 7:08:50 PM Jonathan Gibbons wrote: > Get back to your volcano! > > -- Jon > > > On 02/14/2017 05:00 PM, Robert Field wrote: >> ~/ works everywhere a filename can appear. >> >> So, you can now do >> >> jshell> /env --class-path ~/JavaLibs/guava-21.0.jar >> >> Robert (under a volcano) >> >> >> >> >> >> On February 14, 2017 9:55:22 AM Michel Trudeau >> wrote: >> >>> I would go for such an improvement. Please file an RFE. >>> -- >>> Michel >>> >>> >>> >>>> Peter Levart >>>> February 12, 2017 at 1:09 PM >>>> >>>> >>>> >>>> >>>> No, perhaps not. But it would perhaps be nice to have some kind of >>>> platform-independet way to expand either current Java system >>>> properties or process environment variables (or both) in arguments of >>>> jshell's slash-commands. So one could do for example: >>>> >>>> jshell> /env --class-path {user.home}/JavaLibs/guava-21.0.jar >>>> | Setting new options and restoring state. >>>> >>>> jshell> /env >>>> | --class-path /home/peter/JavaLibs/guava-21.0.jar >>>> >>>> >>>> >>>> Regards, Peter >>>> >>>> Peter Levart >>>> February 12, 2017 at 12:57 PM >>>> Hi, >>>> >>>> >>>> >>>> The problem seems to be the tilde "~" character you used to specify >>>> the path to the jar file. For example: >>>> >>>> jshell> /env --class-path ~/JavaLibs/guava-21.0.jar >>>> | Setting new options and restoring state. >>>> >>>> jshell> /env >>>> | --class-path ~/JavaLibs/guava-21.0.jar >>>> >>>> jshell> import com.google.common.base.Function; >>>> | Error: >>>> | package com.google.common.base does not exist >>>> | import com.google.common.base.Function; >>>> | ^-----------------------------^ >>>> >>>> >>>> ...but... >>>> >>>> jshell> /env --class-path /home/peter/JavaLibs/guava-21.0.jar >>>> | Setting new options and restoring state. >>>> >>>> jshell> /env >>>> | --class-path /home/peter/JavaLibs/guava-21.0.jar >>>> >>>> jshell> import com.google.common.base.Function; >>>> >>>> jshell> >>>> >>>> >>>> The "tilde" character is usually expanded by a UNIX shell: >>>> >>>> bash$ echo ~ >>>> /home/peter >>>> >>>> ...but jshell seems to interpret it literally. >>>> >>>> Should jshell treat and expand /env arguments according to the rules >>>> of native shells on the corresponding platforms? For example, should >>>> it expand %VARIABLE% on Windows and ${VARIABLE} or $VARIABLE on >>>> UNIX-es ? >>>> >>>> Regards, Peter >>>> >>>> Michael M?ller >>>> February 12, 2017 at 7:03 AM >>>> Hi, >>>> >>>> >>>> formerly I could use >>>> >>>> /classpath >>>> ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar >>>> >>>> >>>> | Path '~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ >>>> ParallelStreams.jar' added to classpath >>>> jshell> import de.muellerbruehl.parallelstreams.PersonManager >>>> >>>> >>>> SInce this has become /env, I have trouble with it: >>>> >>>> jshell> /env -class-path >>>> ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar >>>> >>>> >>>> | Setting new options and restoring state. >>>> >>>> jshell> /env >>>> | --class-path >>>> ~/Dropbox/Vortrag/ParallelStreams/ParallelStreams/target/ParallelStreams.jar >>>> >>>> >>>> >>>> jshell> import de.muellerbruehl.parallelstreams.PersonManager >>>> | Error: >>>> | package de.muellerbruehl.parallelstreams does not exist >>>> | import de.muellerbruehl.parallelstreams.PersonManager; >>>> | ^--------------------------------------------^ >>>> >>>> Although /env displays the added classpath, it is not recognized. >>>> To add a classpath, I have to leave the shell and restart it with the >>>> classpath option. >>>> And btw. the doc states a directory will be accepted as classpath. But >>>> I always have to add the fully qualified name of the jar. The >>>> directory only does not work :( >>>> >>> > From kishori.sharan at gmail.com Fri Feb 17 04:02:37 2017 From: kishori.sharan at gmail.com (Kishori Sharan) Date: Thu, 16 Feb 2017 22:02:37 -0600 Subject: The /reset command hangs after setting a startup script Message-ID: Hello, I am using trying to set a startup script for JShell and the jshell prompt hangs. Here are the commands: C:\Test>java -version java version "9-ea" Java(TM) SE Runtime Environment (build 9-ea+157) Java HotSpot(TM) 64-Bit Server VM (build 9-ea+157, mixed mode) C:\Test>jshell | Welcome to JShell -- Version 9-ea | For an introduction type: /help intro jshell> /set start -retain startup.jsh jshell> /reset | Resetting state. The /reset command prints a message that it is resetting state and hangs for a while and start printing stack trace. The startup.jsh file contains a command to set the class path. The command inside the startup.jsh file is: /env -class-path C:\Test\com.abc.jshell\build\classes The old command, /classpath, worked before. I cannot restart jshell if I kill the jshell session. I have to remove the jshell entries from the registry, before I can use jshell again. After few minutes, I see the following exception stack trace that suggests that jshell is in an infinite loop: I could not get the beginning of the stack trace. at jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun(JShellTool.java:1017) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState(JShellTool.java:975) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload(JShellTool.java:2537) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.cmdEnv(JShellTool.java:2533) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.lambda$new$42(JShellTool.java:1559) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processCommand(JShellTool.java:1138) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1080) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun(JShellTool.java:1017) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState(JShellTool.java:975) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload(JShellTool.java:2537) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.cmdEnv(JShellTool.java:2533) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.lambda$new$42(JShellTool.java:1559) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.processCommand(JShellTool.java:1138) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1080) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun(JShellTool.java:1017) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState(JShellTool.java:975) at jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload(JShellTool.java:2537) Thanks Kishori From robert.field at oracle.com Fri Feb 17 04:37:45 2017 From: robert.field at oracle.com (Robert Field) Date: Thu, 16 Feb 2017 22:37:45 -0600 Subject: The /reset command hangs after setting a startup script In-Reply-To: References: Message-ID: <15a4a5c8dc0.2784.4011f3a8741ca2aabce58b8b81f42d24@oracle.com> Oh my! /env -... Sets the value, and then restarts. Part of restart is to run the start up script. So, yes, that creates an infinite loop. Would someone not on vacation file this as a bug and post the bug number here. Thanks, Robert On February 16, 2017 10:02:47 PM Kishori Sharan wrote: > Hello, > I am using trying to set a startup script for JShell and the jshell prompt > hangs. Here are the commands: > > > C:\Test>java -version > java version "9-ea" > Java(TM) SE Runtime Environment (build 9-ea+157) > Java HotSpot(TM) 64-Bit Server VM (build 9-ea+157, mixed mode) > > C:\Test>jshell > | Welcome to JShell -- Version 9-ea > | For an introduction type: /help intro > > jshell> /set start -retain startup.jsh > > jshell> /reset > | Resetting state. > > > The /reset command prints a message that it is resetting state and hangs > for a while and start printing stack trace. The startup.jsh file contains a > command to set the class path. The command inside the startup.jsh file is: > > /env -class-path C:\Test\com.abc.jshell\build\classes > > The old command, /classpath, worked before. > > I cannot restart jshell if I kill the jshell session. I have to remove the > jshell entries from the registry, before I can use jshell again. After few > minutes, I see the following exception stack trace that suggests that > jshell is in an infinite loop: I could not get the beginning of the stack > trace. > > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun(JShellTool.java:1017) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState(JShellTool.java:975) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload(JShellTool.java:2537) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.cmdEnv(JShellTool.java:2533) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.lambda$new$42(JShellTool.java:1559) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.processCommand(JShellTool.java:1138) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1080) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun(JShellTool.java:1017) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState(JShellTool.java:975) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload(JShellTool.java:2537) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.cmdEnv(JShellTool.java:2533) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.lambda$new$42(JShellTool.java:1559) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.processCommand(JShellTool.java:1138) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1080) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun(JShellTool.java:1017) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState(JShellTool.java:975) > at > jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload(JShellTool.java:2537) > > > Thanks > Kishori From bitterfoxc at gmail.com Tue Feb 21 15:46:49 2017 From: bitterfoxc at gmail.com (ShinyaYoshida) Date: Wed, 22 Feb 2017 00:46:49 +0900 Subject: The /reset command hangs after setting a startup script In-Reply-To: <15a4a5c8dc0.2784.4011f3a8741ca2aabce58b8b81f42d24@oracle.com> References: <15a4a5c8dc0.2784.4011f3a8741ca2aabce58b8b81f42d24@oracle.com> Message-ID: Hi Kishori and Robert, I've filed this as a P4 bug with a description and a comment by quoting your emails: Please fix the ticket if there is some problems...(of course, after when you be back) https://bugs.openjdk.java.net/browse/JDK-8175304 Thank you for using jshell and reporting the problem! Regards, shinyafox(Shinya Yoshida) 2017-02-17 13:37 GMT+09:00 Robert Field : > Oh my! > > /env -... > > Sets the value, and then restarts. Part of restart is to run the start up > script. So, yes, that creates an infinite loop. > > Would someone not on vacation file this as a bug and post the bug number > here. > > Thanks, > Robert > > > > > On February 16, 2017 10:02:47 PM Kishori Sharan > wrote: > > Hello, >> I am using trying to set a startup script for JShell and the jshell prompt >> hangs. Here are the commands: >> >> >> C:\Test>java -version >> java version "9-ea" >> Java(TM) SE Runtime Environment (build 9-ea+157) >> Java HotSpot(TM) 64-Bit Server VM (build 9-ea+157, mixed mode) >> >> C:\Test>jshell >> | Welcome to JShell -- Version 9-ea >> | For an introduction type: /help intro >> >> jshell> /set start -retain startup.jsh >> >> jshell> /reset >> | Resetting state. >> >> >> The /reset command prints a message that it is resetting state and hangs >> for a while and start printing stack trace. The startup.jsh file contains >> a >> command to set the class path. The command inside the startup.jsh file is: >> >> /env -class-path C:\Test\com.abc.jshell\build\classes >> >> The old command, /classpath, worked before. >> >> I cannot restart jshell if I kill the jshell session. I have to remove the >> jshell entries from the registry, before I can use jshell again. After few >> minutes, I see the following exception stack trace that suggests that >> jshell is in an infinite loop: I could not get the beginning of the stack >> trace. >> >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun( >> JShellTool.java:1017) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState( >> JShellTool.java:975) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload( >> JShellTool.java:2537) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.cmdEnv(JShell >> Tool.java:2533) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.lambda$new$ >> 42(JShellTool.java:1559) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.processComman >> d(JShellTool.java:1138) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1080) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun( >> JShellTool.java:1017) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState( >> JShellTool.java:975) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload( >> JShellTool.java:2537) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.cmdEnv(JShell >> Tool.java:2533) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.lambda$new$ >> 42(JShellTool.java:1559) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.processComman >> d(JShellTool.java:1138) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1080) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.startUpRun( >> JShellTool.java:1017) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.resetState( >> JShellTool.java:975) >> at >> jdk.jshell/jdk.internal.jshell.tool.JShellTool.doReload( >> JShellTool.java:2537) >> >> >> Thanks >> Kishori >> > > >