Re: RFR: 8159855: Create an SPI for tools

2016-10-07 Thread Mandy Chung
> On Oct 7, 2016, at 2:40 PM, Jonathan Gibbons > wrote: > > Updated webrev with feedback from comments: > > * use doPrivileged within ToolProvider.findFIrst (includes adding new test) > * improve whitespace in doc comments > > Webrev: http://cr.openjdk.java.net/~jjg/8159855/webrev.05/ Looks

Re: RFR: 8159855: Create an SPI for tools

2016-10-07 Thread Jonathan Gibbons
Updated webrev with feedback from comments: * use doPrivileged within ToolProvider.findFIrst (includes adding new test) * improve whitespace in doc comments Webrev: http://cr.openjdk.java.net/~jjg/8159855/webrev.05/ -- Jon On 10/04/2016 09:19 PM, Mandy Chung wrote: This SPI is useful and p

Re: RFR: 8159855: Create an SPI for tools

2016-10-05 Thread Jonathan Gibbons
On 10/5/16 3:34 AM, Alan Bateman wrote: On 05/10/2016 10:54, Stephen Colebourne wrote: Interesting. How likely is it that there will be more than one tool of a given name available? The method name findFirst() seems relatively odd for the lookup operation. I'd also note that the name string t

Re: RFR: 8159855: Create an SPI for tools

2016-10-05 Thread Alan Bateman
On 05/10/2016 05:19, Mandy Chung wrote: : ToolProvider::findFirst(String name) can find tool providers on classpath. I think it needs to wrap the for-loop (specifically iterating on providers) with doPrivileged due to the stack-based permission check. Yes, that will be needed, otherwise the

Re: RFR: 8159855: Create an SPI for tools

2016-10-05 Thread Alan Bateman
On 05/10/2016 10:54, Stephen Colebourne wrote: Interesting. How likely is it that there will be more than one tool of a given name available? The method name findFirst() seems relatively odd for the lookup operation. I'd also note that the name string to pass in are "magic". There are no const

Re: RFR: 8159855: Create an SPI for tools

2016-10-04 Thread Mandy Chung
This SPI is useful and provides as a replacement to existing use of internal APIs to launch some of our tools. We will get jar, jmod, jlink and possibly other tools to convert to this SPI. ToolProvider::findFirst(String name) can find tool providers on classpath. I think it needs to wrap the

Re: RFR: 8159855: Create an SPI for tools

2016-10-04 Thread Mandy Chung
This SPI is useful and provides as a replacement to existing use of internal APIs to launch some of our tools. We will get jar, jmod, jlink and possibly other tools to convert to this SPI. ToolProvider::findFirst(String name) can find tool providers on classpath. I think it needs to wrap the

Re: RFR: 8159855: Create an SPI for tools

2016-10-04 Thread Jonathan Gibbons
Resend with non-mostly-empty subject line! -- Jon On 10/04/2016 04:39 PM, Jonathan Gibbons wrote: Core-libs folk, Please review the following change to add a new service provider class java.util.spi.ToolProvider which can be used provide simple "command-line" access to select JDK tools, w