Skip to content

Commit 49edd64

Browse files
committed
Don't use java.util.zip.ZipError (not used in JDK since Java 9)
This class is deprecated for removal since JDK 24. See https://bugs.openjdk.org/browse/JDK-8336843 Fixes eclipse-jdt#2856
1 parent d089473 commit 49edd64

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import java.nio.file.NoSuchFileException;
2323
import java.util.Enumeration;
2424
import java.util.zip.ZipEntry;
25-
import java.util.zip.ZipError;
2625
import java.util.zip.ZipFile;
2726
import org.eclipse.core.resources.IFile;
2827
import org.eclipse.core.runtime.CoreException;
@@ -281,7 +280,7 @@ public boolean execute(IProgressMonitor progressMonitor) {
281280
}
282281
monitor.exitWrite(); // free write lock
283282
}
284-
} catch (IOException | ZipError e) {
283+
} catch (IOException e) {
285284
if (e instanceof NoSuchFileException) {
286285
org.eclipse.jdt.internal.core.util.Util.log(Status.info("Can not index not existing zip " + this.containerPath)); //$NON-NLS-1$
287286
} else if ("zip file is empty".equals(e.getMessage())) { //$NON-NLS-1$

0 commit comments

Comments
 (0)