changeset 15737:d428848b11ad

8167058: (fs) UnixDirectoryIterator::stream unused Summary: Remove UnixDirectoryIterator::stream unused instance variable Reviewed-by: redestad, alanb
author bpb
date Tue, 04 Oct 2016 08:32:49 -0700
parents 95d83639923d
children 424706b22c1a
files src/java.base/unix/classes/sun/nio/fs/UnixDirectoryStream.java
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/unix/classes/sun/nio/fs/UnixDirectoryStream.java	Tue Oct 04 11:55:42 2016 +0300
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixDirectoryStream.java	Tue Oct 04 08:32:49 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, 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
@@ -116,7 +116,7 @@
         synchronized (this) {
             if (iterator != null)
                 throw new IllegalStateException("Iterator already obtained");
-            iterator = new UnixDirectoryIterator(ds);
+            iterator = new UnixDirectoryIterator();
             return iterator;
         }
     }
@@ -130,17 +130,14 @@
      * Iterator implementation
      */
     private class UnixDirectoryIterator implements Iterator<Path> {
-        private final DirectoryStream<Path> stream;
-
         // true when at EOF
         private boolean atEof;
 
         // next entry to return
         private Path nextEntry;
 
-        UnixDirectoryIterator(DirectoryStream<Path> stream) {
+        UnixDirectoryIterator() {
             atEof = false;
-            this.stream = stream;
         }
 
         // Return true if file name is "." or ".."