Skip to content

Commit

Permalink
Merge pull request #382 from JasonFengJ9/notcrsafezip
Browse files Browse the repository at this point in the history
CRIU adds @NotCheckpointSafe for ZipFile.getEntry(String)
  • Loading branch information
tajila authored Sep 17, 2024
2 parents c5b4b77 + c60d176 commit 48be99a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions closed/GensrcJ9JCL.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ $(eval $(call SetupCopyFiles,COPY_OVERLAY_FILES, \
src/java.base/share/classes/java/util/Timer.java \
src/java.base/share/classes/java/util/TimerTask.java \
src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java \
src/java.base/share/classes/java/util/zip/ZipFile.java \
src/java.base/share/classes/jdk/internal/access/JavaNetInetAddressAccess.java \
src/java.base/share/classes/jdk/internal/ref/PhantomCleanable.java \
src/java.base/share/classes/module-info.java \
Expand Down
13 changes: 13 additions & 0 deletions src/java.base/share/classes/java/util/zip/ZipFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* questions.
*/

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved
* ===========================================================================
*/

package java.util.zip;

import java.io.Closeable;
Expand Down Expand Up @@ -75,6 +81,10 @@
import static java.util.zip.ZipConstants64.*;
import static java.util.zip.ZipUtils.*;

/*[IF CRIU_SUPPORT]*/
import openj9.internal.criu.NotCheckpointSafe;
/*[ENDIF] CRIU_SUPPORT */

/**
* This class is used to read entries from a zip file.
*
Expand Down Expand Up @@ -331,6 +341,9 @@ public String getComment() {
* @return the zip file entry, or null if not found
* @throws IllegalStateException if the zip file has been closed
*/
/*[IF CRIU_SUPPORT]*/
@NotCheckpointSafe
/*[ENDIF] CRIU_SUPPORT */
public ZipEntry getEntry(String name) {
Objects.requireNonNull(name, "name");
ZipEntry entry = null;
Expand Down

0 comments on commit 48be99a

Please sign in to comment.