--- old/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipDirectoryStream.java 2019-01-15 16:23:40.000000000 -0500 +++ new/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipDirectoryStream.java 2019-01-15 16:23:40.000000000 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2019, 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 @@ -27,6 +27,7 @@ import java.io.IOException; import java.nio.file.ClosedDirectoryStreamException; +import java.nio.file.DirectoryIteratorException; import java.nio.file.DirectoryStream; import java.nio.file.NotDirectoryException; import java.nio.file.Path; @@ -67,7 +68,7 @@ try { itr = zipfs.iteratorOf(dir, filter); } catch (IOException e) { - throw new IllegalStateException(e); + throw new DirectoryIteratorException(e); } return new Iterator() {