< prev index next >

src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipDirectoryStream.java

Print this page
rev 53038 : 8215472: (zipfs) Cleanups in implementation classes of jdk.zipfs and tests

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -23,23 +23,22 @@
  * questions.
  */
 
 package jdk.nio.zipfs;
 
-import java.nio.file.DirectoryStream;
+import java.io.IOException;
 import java.nio.file.ClosedDirectoryStreamException;
+import java.nio.file.DirectoryStream;
 import java.nio.file.NotDirectoryException;
 import java.nio.file.Path;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
-import java.io.IOException;
 
 /**
  *
- * @author  Xueming Shen, Rajendra Gutupalli, Jaya Hangal
+ * @author Xueming Shen, Rajendra Gutupalli, Jaya Hangal
  */
-
 class ZipDirectoryStream implements DirectoryStream<Path> {
 
     private final ZipFileSystem zipfs;
     private final ZipPath dir;
     private final DirectoryStream.Filter<? super Path> filter;

@@ -68,12 +67,12 @@
         try {
             itr = zipfs.iteratorOf(dir, filter);
         } catch (IOException e) {
             throw new IllegalStateException(e);
         }
+
         return new Iterator<Path>() {
-            private Path next;
             @Override
             public boolean hasNext() {
                 if (isClosed)
                     return false;
                 return itr.hasNext();

@@ -95,7 +94,6 @@
 
     @Override
     public synchronized void close() throws IOException {
         isClosed = true;
     }
-
 }
< prev index next >