RFR: 8274881: Update jdk.compiler classes to use try-with-resources

Andrey Turbanov duke at openjdk.java.net
Tue Oct 12 08:11:50 UTC 2021


On Tue, 12 Oct 2021 02:49:43 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> 8274881: Update jdk.compiler classes to use try-with-resources
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/processing/ServiceProxy.java line 127:
> 
>> 125:             } catch (IOException y) {
>> 126:                 fail(service, ": " + y);
>> 127:             }
> 
> I haven't traced through this in detail, but it seems different exception behavior could occur.

`fail` method just throws `ServiceConfigurationError`. So, any IOException is still generates the same exception. No behavior change here.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5816


More information about the compiler-dev mailing list