Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v10]

2024-07-08 Thread Jorn Vernee
On Sat, 29 Jun 2024 06:26:57 GMT, Alan Bateman wrote: > I assume you'll create follow-up issues in JBS for the Class-Path attribute, > improvement the usage/help output to replace the "Path"/"String" types. I've filed: https://bugs.openjdk.org/browse/JDK-8335877 and https://bugs.openjdk.org/br

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v12]

2024-07-08 Thread Jorn Vernee
On Fri, 5 Jul 2024 13:44:46 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v12]

2024-07-08 Thread Alan Bateman
On Fri, 5 Jul 2024 13:44:46 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v12]

2024-07-05 Thread Jorn Vernee
On Fri, 5 Jul 2024 13:44:46 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v12]

2024-07-05 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v11]

2024-07-01 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v10]

2024-07-01 Thread Julian Waters
On Fri, 28 Jun 2024 19:43:36 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v10]

2024-06-28 Thread Alan Bateman
On Fri, 28 Jun 2024 19:43:36 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v10]

2024-06-28 Thread Chen Liang
On Fri, 28 Jun 2024 19:43:36 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v10]

2024-06-28 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v9]

2024-06-28 Thread Jorn Vernee
On Fri, 28 Jun 2024 16:47:27 GMT, Alan Bateman wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> de-dupe on path, not module name > > src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/JNativeScanTask.java > line

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v9]

2024-06-28 Thread Alan Bateman
On Mon, 24 Jun 2024 12:57:39 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v9]

2024-06-28 Thread Alan Bateman
On Mon, 24 Jun 2024 12:57:39 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v9]

2024-06-28 Thread Alan Bateman
On Mon, 24 Jun 2024 12:57:39 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-28 Thread Alan Bateman
On Thu, 20 Jun 2024 19:37:23 GMT, Jorn Vernee wrote: > It looks like it's possible to get even more custom by using a custom > `HelpFormatter` as well, if we wanted. I think what you have is okay for the first integration, just looks odd to have the help/usage say "String" and "Path". Using a

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v9]

2024-06-27 Thread Jan Lahoda
On Mon, 24 Jun 2024 12:57:39 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v9]

2024-06-24 Thread Jorn Vernee
On Mon, 24 Jun 2024 12:57:39 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v9]

2024-06-24 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v8]

2024-06-21 Thread Jorn Vernee
On Thu, 20 Jun 2024 17:25:33 GMT, Alan Bateman wrote: >> Something like that yes > > An altermative is to use ResolvedModule::reference to get a ModuleReference, > then use its open method to open the contents of the module to get a > ModuleReader. That will give you a stream over the names of

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v8]

2024-06-21 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v7]

2024-06-21 Thread Jorn Vernee
On Fri, 21 Jun 2024 18:38:07 GMT, Jorn Vernee wrote: >> test/langtools/tools/jnativescan/TestJNativeScan.java line 174: >> >>> 172: "-add-modules", >>> "org.singlejar,org.myapp", >>> 173: "--print-native-access")) >>> 174:

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v7]

2024-06-21 Thread Jan Lahoda
On Fri, 21 Jun 2024 18:37:01 GMT, Jorn Vernee wrote: >> src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java line 417: >> >>> 415: return false; >>> 416: } >>> 417: JavaFileManager fm = >>> pp.getPlatformTrusted(release).getFileManager(); >> >>

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v7]

2024-06-21 Thread Jorn Vernee
On Fri, 21 Jun 2024 18:31:00 GMT, Jan Lahoda wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add extra test for missing root modules > > src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java line 417: > >>

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-21 Thread Jan Lahoda
On Thu, 20 Jun 2024 17:44:54 GMT, Alan Bateman wrote: >> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/JNativeScanTask.java >> line 113: >> >>> 111: // Class-Path attribute specifies that jars that >>> 112: // are not found are simply ignored. Do

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v7]

2024-06-21 Thread Jan Lahoda
On Thu, 20 Jun 2024 19:45:29 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v7]

2024-06-21 Thread Jan Lahoda
On Thu, 20 Jun 2024 16:58:55 GMT, Alan Bateman wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JDKPlatformProvider.java >> line 93: >> >>> 91: } >>> 92: >>> 93: public PlatformDescription getPlatformTrusted(String platformName) { >> >> I noticed that `getPlatform

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-21 Thread Alan Bateman
On Thu, 20 Jun 2024 19:37:23 GMT, Jorn Vernee wrote: > I've massaged the parsing code to where the help message now looks like this: It is better but it might mean looking at HelpFormatter as you mentioned,. Right now the usage message `--add-modules ` whereas the java --help will print `--add

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v7]

2024-06-20 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Jorn Vernee
On Thu, 20 Jun 2024 12:11:25 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v6]

2024-06-20 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Jorn Vernee
On Thu, 20 Jun 2024 16:13:04 GMT, Alan Bateman wrote: > Another thing is that using joptsimple gives up a bit of control, e.g. the > help output shows the parameter for --class-path as `` where the java > launcher and other tools will show "path" or "class path". Same thing with > `--release`

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Alan Bateman
On Thu, 20 Jun 2024 17:40:25 GMT, Alan Bateman wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update man page header to be consisten with the others > > src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/JNative

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Alan Bateman
On Thu, 20 Jun 2024 12:11:25 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Alan Bateman
On Wed, 19 Jun 2024 21:13:33 GMT, Maurizio Cimadamore wrote: >> What do you suggest? Just a note in the error message that exploded >> modules/class paths are not supported? > > Something like that yes An altermative is to use ResolvedModule::reference to get a ModuleReference, then use its o

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Alan Bateman
On Tue, 18 Jun 2024 16:35:10 GMT, Jorn Vernee wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update man page header to be consisten with the others > > src/jdk.compiler/share/classes/com/sun/tools/javac/platform/JD

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Alan Bateman
On Thu, 20 Jun 2024 12:11:25 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Alan Bateman
On Thu, 20 Jun 2024 12:11:25 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-20 Thread Maurizio Cimadamore
On Thu, 20 Jun 2024 11:38:26 GMT, Jorn Vernee wrote: >> src/jdk.jdeps/share/man/jnativescan.1 line 121: >> >>> 119: .TP >>> 120: \f[V]--release\f[R] \f[I]version\f[R] >>> 121: Used to specify the Java SE release that specifies the set of >>> restricted >> >> In principle, the release could als

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Jorn Vernee
On Thu, 20 Jun 2024 12:51:22 GMT, Evemose wrote: > wouldn't it be better to create one uniform tool See my reply here: https://github.com/openjdk/jdk/pull/19774#issuecomment-2179078565 - PR Comment: https://git.openjdk.org/jdk/pull/19774#issuecomment-2180653743

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Evemose
On Thu, 20 Jun 2024 12:11:25 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v4]

2024-06-20 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-20 Thread Jorn Vernee
On Wed, 19 Jun 2024 21:35:07 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - review comments >> - add man page > > src/jdk.jdeps/share/man/jnativescan.1 line 166: > >> 164: .fi >> 165:

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-20 Thread Jorn Vernee
On Thu, 20 Jun 2024 11:42:04 GMT, Jorn Vernee wrote: >> src/jdk.jdeps/share/man/jnativescan.1 line 127: >> >>> 125: This option should be set to the version of the runtime under which the >>> 126: application is eventually intended to be run. >>> 127: If this flag is omitted, the version of \f[V

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-20 Thread Jorn Vernee
On Wed, 19 Jun 2024 21:30:49 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - review comments >> - add man page > > src/jdk.jdeps/share/man/jnativescan.1 line 121: > >> 119: .TP >> 120:

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-19 Thread Maurizio Cimadamore
On Wed, 19 Jun 2024 21:22:10 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - review comments >> - add man page > > src/jdk.jdeps/share/man/jnativescan.1 line 68: > >> 66: .TP >> 67: \f[

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-19 Thread Maurizio Cimadamore
On Wed, 19 Jun 2024 21:16:46 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 18:57:43 GMT, Jorn Vernee wrote: >> I can do that, but I think this will always be a bit awkward since these >> types don't have a common super type that exposes the needed information. > >> these types don't have a common super type that exposes the needed >> information >

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 21:13:33 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-19 Thread Maurizio Cimadamore
On Wed, 19 Jun 2024 19:59:19 GMT, Jorn Vernee wrote: >> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/JNativeScanTask.java >> line 76: >> >>> 74: URI location = m.reference().location().orElseThrow(); >>> 75: Path path = Path.of(location); >>> 76: che

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 18:02:08 GMT, Jorn Vernee wrote: >> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/ClassResolver.java >> line 126: >> >>> 124: >>> 125: private static Map packageToSystemModule() { >>> 126: List descriptors = >>> ModuleFinder.ofSystem() >> >> Is

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v2]

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 19:00:22 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool accepts

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v3]

2024-06-19 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v2]

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 17:41:36 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/Main.java >> >> Co-authored-by: Maurizio Cimad

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v2]

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 17:45:14 GMT, Jorn Vernee wrote: >> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/RestrictedMethodFinder.java >> line 120: >> >>> 118: Optional info = >>> systemClassResolver.lookup(methodRef.owner()); >>> 119: if (!info.isPresent()) { >>> 12

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v2]

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 18:09:15 GMT, Jorn Vernee wrote: > these types don't have a common super type that exposes the needed information No wait, they actually do :) That's just `MemberRefEntry`. - PR Review Comment: https://git.openjdk.org/jdk/pull/19774#discussion_r1646604479

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v2]

2024-06-19 Thread Jorn Vernee
> This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a list of class path and module path entries through > `--

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Maurizio Cimadamore
On Wed, 19 Jun 2024 18:00:37 GMT, Jorn Vernee wrote: >> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/JNativeScanTask.java >> line 81: >> >>> 79: >>> 80: Map>> >>> allRestrictedMethods; >>> 81: try(ClassResolver classesToScan = >>> ClassResolver.forScannedModules(modu

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 17:28:23 GMT, Maurizio Cimadamore wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The too

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 17:53:12 GMT, Maurizio Cimadamore wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The too

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Maurizio Cimadamore
On Wed, 19 Jun 2024 17:25:07 GMT, Jorn Vernee wrote: >> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/RestrictedMethodFinder.java >> line 43: >> >>> 41: import java.util.*; >>> 42: >>> 43: class RestrictedMethodFinder { >> >> The name of this is a bit confusing as this class looks for

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Maurizio Cimadamore
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 17:30:08 GMT, Maurizio Cimadamore wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The too

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Maurizio Cimadamore
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Maurizio Cimadamore
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Maurizio Cimadamore
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Maurizio Cimadamore
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Maurizio Cimadamore
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 17:16:54 GMT, Maurizio Cimadamore wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The too

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Maurizio Cimadamore
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Jorn Vernee
On Wed, 19 Jun 2024 14:30:23 GMT, Roger Riggs wrote: > One more tool. or... Could this be coalesced into a tool that does deprscan > and restricted methods, and other "lint" type checks? I might go so far as to > suggest it be extensible and accept patterns or regular expressions for > matchin

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Magnus Ihse Bursie
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Roger Riggs
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Jorn Vernee
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li