changeset 11243:b1dafe86ab5c

8068948: Update java.base module to use new try-with-resources statement Reviewed-by: alanb, igerasim
author darcy
date Wed, 14 Jan 2015 16:44:59 -0800
parents 1d796a93a6a2
children 803d8d4d7595
files src/java.base/unix/classes/java/io/FileDescriptor.java src/java.base/windows/classes/java/io/FileDescriptor.java
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/unix/classes/java/io/FileDescriptor.java	Wed Jan 14 12:09:38 2015 -0800
+++ b/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/src/java.base/windows/classes/java/io/FileDescriptor.java	Wed Jan 14 12:09:38 2015 -0800
+++ b/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 {