8068948: Update java.base module to use new try-with-resources statement
authordarcy
Wed, 14 Jan 2015 16:44:59 -0800
changeset 28425 241dd1e2d9cb
parent 28424 3e9d7d7dd362
child 28426 7439e01a464b
8068948: Update java.base module to use new try-with-resources statement Reviewed-by: alanb, igerasim
jdk/src/java.base/unix/classes/java/io/FileDescriptor.java
jdk/src/java.base/windows/classes/java/io/FileDescriptor.java
--- 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 {