diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java index f97d822e7..1c48c0742 100644 --- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java +++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java @@ -25,8 +25,7 @@ public class FileUtils { private static File[] untarFile(File source, File outputDir) throws IOException, TarException { List<File> untarredFiles = new ArrayList<>(); try (TarFile tarFile = new TarFile(source)) { - for (Enumeration<TarEntry> e = tarFile.entries(); e.hasMoreElements();) { - TarEntry entry = e.nextElement(); + for (TarEntry entry : tarFile.entries()) { try (InputStream input = tarFile.getInputStream(entry)) { File outFile = createSubPathFile(outputDir, entry.getName()); outFile = outFile.getCanonicalFile(); //bug 266844 |