RFR(XS) : 8178340: remove unneeded "throws" from ProcessTools::createJavaProcessBuilder

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFR(XS) : 8178340: remove unneeded "throws" from ProcessTools::createJavaProcessBuilder

Igor Ignatyev
http://cr.openjdk.java.net/~iignatyev//8178340/webrev.00/index.html
> 8 lines changed: 0 ins; 2 del; 6 mod;
Hi all,

could you please review this tiny fix which clean up testlibary?

ProcessTools::createJavaProcessBuilder methods can not throw any checked exceptions, but were declared with 'throws Exception', which forced all users of these methods to either have redundant try-catch or throws. the fix cleans up the method declaration in all three copies of testlibary.

webrev: http://cr.openjdk.java.net/~iignatyev//8178340/webrev.00/index.html
jbs: https://bugs.openjdk.java.net/browse/JDK-8178340
testing: hotspot, jdk, langtools and jaxp tests

Thanks,
-- Igor

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR(XS) : 8178340: remove unneeded "throws" from ProcessTools::createJavaProcessBuilder

David Holmes
Hi Igor,

This looks fine to me.

I was a little concerned any tests with a try/catch around these calls
would fail to compile due to exception checking, but class Exception is
exempt from that checking.

Thanks,
David

On 11/04/2017 8:42 AM, Igor Ignatyev wrote:

> http://cr.openjdk.java.net/~iignatyev//8178340/webrev.00/index.html
>> 8 lines changed: 0 ins; 2 del; 6 mod;
> Hi all,
>
> could you please review this tiny fix which clean up testlibary?
>
> ProcessTools::createJavaProcessBuilder methods can not throw any checked exceptions, but were declared with 'throws Exception', which forced all users of these methods to either have redundant try-catch or throws. the fix cleans up the method declaration in all three copies of testlibary.
>
> webrev: http://cr.openjdk.java.net/~iignatyev//8178340/webrev.00/index.html
> jbs: https://bugs.openjdk.java.net/browse/JDK-8178340
> testing: hotspot, jdk, langtools and jaxp tests
>
> Thanks,
> -- Igor
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR(XS) : 8178340: remove unneeded "throws" from ProcessTools::createJavaProcessBuilder

Igor Ignatyev
Hi David,

thanks for review.

-- Igor

> On Apr 11, 2017, at 12:04 AM, David Holmes <[hidden email]> wrote:
>
> Hi Igor,
>
> This looks fine to me.
>
> I was a little concerned any tests with a try/catch around these calls would fail to compile due to exception checking, but class Exception is exempt from that checking.
>
> Thanks,
> David
>
> On 11/04/2017 8:42 AM, Igor Ignatyev wrote:
>> http://cr.openjdk.java.net/~iignatyev//8178340/webrev.00/index.html
>>> 8 lines changed: 0 ins; 2 del; 6 mod;
>> Hi all,
>>
>> could you please review this tiny fix which clean up testlibary?
>>
>> ProcessTools::createJavaProcessBuilder methods can not throw any checked exceptions, but were declared with 'throws Exception', which forced all users of these methods to either have redundant try-catch or throws. the fix cleans up the method declaration in all three copies of testlibary.
>>
>> webrev: http://cr.openjdk.java.net/~iignatyev//8178340/webrev.00/index.html
>> jbs: https://bugs.openjdk.java.net/browse/JDK-8178340
>> testing: hotspot, jdk, langtools and jaxp tests
>>
>> Thanks,
>> -- Igor
>>

Loading...