Skip to content

Commit

Permalink
Merge 'community-backports-jdk21u/master' into mandrel/23.1 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jerboaa committed Aug 22, 2024
2 parents ec7b593 + 7ff5518 commit c1f962d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
15 changes: 15 additions & 0 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# GraalVM Community Backports Repositories Guidelines

1. Commits to a GraalVM Community Edition (CE) release branch or maintenance repository are either a) replicas of existing commits applied to the `master` branch in the `oracle/graal` repository or b) specific to the maintained version. Such commits are intended to fix or improve existing features, must always keep release stability in mind, and ensure compatibility with published public APIs.

2. Release branches shall be maintained by Oracle in `oracle/graal` for six months per GraalVM CE release. During that time, the community can request backports through pull requests against the corresponding release branch in `oracle/graal`.

3. After six months and only for Java LTS releases that the community wants to support long-term (e.g., 21), Oracle shall create a dedicated repository (e.g., `graalvm/graalvm-community-jdk21u`) to maintain community backports and version-specific bug fixes.

4. Each repository shall be managed by one maintainer, appointed by Oracle, with the permission to approve and merge pull requests.

5. The repositories shall not be used to ship new releases of GraalVM CE or any other GraalVM distribution, only to maintain source code. Distributors should use these repositories as their primary source for creating GraalVM CE-based builds.

6. The creation of maintenance repositories for other GraalVM projects (e.g., LabsJDK or GraalJS) can also be requested by the community after six months. The same rules apply.

7. Maven artifacts under the `org.graalvm` group that are used by both GraalVM CE-based distributions and Oracle GraalVM will be maintained by Oracle.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public class JDK21u3OrEarlier implements BooleanSupplier {

public static final boolean jdk21u3OrEarlier = JavaVersionUtil.JAVA_SPEC < 21 ||
(JavaVersionUtil.JAVA_SPEC == 21 && Runtime.version().update() <= 3);
(JavaVersionUtil.JAVA_SPEC == 21 && Runtime.version().update() <= 3);

@Override
public boolean getAsBoolean() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public class JDK21u4OrLater implements BooleanSupplier {

public static final boolean jdk21u4OrLater = JavaVersionUtil.JAVA_SPEC > 21 ||
(JavaVersionUtil.JAVA_SPEC == 21 && Runtime.version().update() >= 4);
(JavaVersionUtil.JAVA_SPEC == 21 && Runtime.version().update() >= 4);

@Override
public boolean getAsBoolean() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.nio.charset.CharsetDecoder;
import java.security.AccessControlContext;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ForkJoinPool;
Expand Down Expand Up @@ -386,6 +387,15 @@ private static synchronized ForkJoinPool initializeCommonPool() {
}
}

@TargetClass(value = java.util.concurrent.ForkJoinPool.class, innerClass = "DefaultForkJoinWorkerThreadFactory", onlyWith = JDK21OrLater.class)
@SuppressWarnings("removal")
final class Target_java_util_concurrent_ForkJoinPool_DefaultForkJoinWorkerThreadFactory {
@Alias @RecomputeFieldValue(kind = Reset) //
static AccessControlContext regularACC;
@Alias @RecomputeFieldValue(kind = Reset) //
static AccessControlContext commonACC;
}

/** Dummy class to have a class with the file's name. */
public final class RecomputedFields {
}

0 comments on commit c1f962d

Please sign in to comment.