8167058: (fs) UnixDirectoryIterator::stream unused
authorbpb
Tue, 04 Oct 2016 08:32:49 -0700
changeset 41227 ce7381851981
parent 41226 da753c438a07
child 41228 bb9385e8c619
8167058: (fs) UnixDirectoryIterator::stream unused Summary: Remove UnixDirectoryIterator::stream unused instance variable Reviewed-by: redestad, alanb
jdk/src/java.base/unix/classes/sun/nio/fs/UnixDirectoryStream.java
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixDirectoryStream.java	Tue Oct 04 11:55:42 2016 +0300
+++ b/jdk/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 ".."