8068948: Update java.base module to use new try-with-resources statement
Reviewed-by: alanb, igerasim
--- a/jdk/src/java.base/unix/classes/java/io/FileDescriptor.java Wed Jan 14 12:09:38 2015 -0800
+++ b/jdk/src/java.base/unix/classes/java/io/FileDescriptor.java Wed Jan 14 16:44:59 2015 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -214,7 +214,7 @@
if (!closed) {
closed = true;
IOException ioe = null;
- try (Closeable c = releaser) {
+ try (releaser) {
if (otherParents != null) {
for (Closeable referent : otherParents) {
try {
--- a/jdk/src/java.base/windows/classes/java/io/FileDescriptor.java Wed Jan 14 12:09:38 2015 -0800
+++ b/jdk/src/java.base/windows/classes/java/io/FileDescriptor.java Wed Jan 14 16:44:59 2015 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -212,7 +212,7 @@
if (!closed) {
closed = true;
IOException ioe = null;
- try (Closeable c = releaser) {
+ try (releaser) {
if (otherParents != null) {
for (Closeable referent : otherParents) {
try {