Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valhalla enable methods for latest openjdk updates #20528

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions jcl/src/java.base/share/classes/java/lang/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@
/*[ENDIF] JAVA_SPEC_VERSION >= 9 */
import sun.nio.ch.Interruptible;
import sun.reflect.annotation.AnnotationType;
/*[IF (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES]*/
/*[IF JAVA_SPEC_VERSION >= 24]*/
import java.util.concurrent.Executor;
import jdk.internal.loader.NativeLibraries;
/*[ENDIF] (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES */
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

/**
* Helper class to allow privileged access to classes
Expand Down Expand Up @@ -833,7 +833,6 @@ public Object stringConcat1(String[] constants) {
return new StringConcatHelper.Concat1(constants);
}

/*[IF !INLINE-TYPES]*/
@Override
public String concat(String prefix, Object value, String suffix) {
return StringConcatHelper.concat(prefix, value, suffix);
Expand Down Expand Up @@ -863,7 +862,6 @@ public byte stringInitCoder() {
public Executor virtualThreadDefaultScheduler() {
return VirtualThread.defaultScheduler();
}
/*[ENDIF] !INLINE-TYPES */
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

/*[ENDIF] JAVA_SPEC_VERSION >= 9 */
Expand Down
12 changes: 6 additions & 6 deletions jcl/src/java.base/share/classes/java/lang/Class.java
Original file line number Diff line number Diff line change
Expand Up @@ -2947,12 +2947,12 @@ public Package getPackage() {
}
}

/*[IF (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES]*/
/*[IF JAVA_SPEC_VERSION >= 24]*/
@SuppressWarnings("unchecked")
static <T> Class<T> getPrimitiveClass(String name)
/*[ELSE] (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES */
/*[ELSE] JAVA_SPEC_VERSION >= 24 */
static Class<?> getPrimitiveClass(String name)
/*[ENDIF] (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES */
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
{
Class<?> type;

Expand Down Expand Up @@ -2998,11 +2998,11 @@ static Class<?> getPrimitiveClass(String name)
type = array.getClass().getComponentType();
}

/*[IF (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES]*/
/*[IF JAVA_SPEC_VERSION >= 24]*/
return (Class<T>) type;
/*[ELSE] (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES */
/*[ELSE] JAVA_SPEC_VERSION >= 24 */
return type;
/*[ENDIF] (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES */
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
import com.sun.management.HotSpotDiagnosticMXBean;
/*[ENDIF] JAVA_SPEC_VERSION >= 21 */

/*[IF (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES]*/
/*[IF JAVA_SPEC_VERSION >= 24]*/
import com.sun.management.internal.VirtualThreadSchedulerImpls;
import jdk.management.VirtualThreadSchedulerMXBean;
/*[ENDIF] (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES */
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

/**
* This class implements the service-provider interface to make OpenJ9-specific
Expand Down Expand Up @@ -123,11 +123,11 @@ public final class PlatformMBeanProvider extends sun.management.spi.PlatformMBea
.register(allComponents);
/*[ENDIF] JAVA_SPEC_VERSION >= 21 */

/*[IF (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES]*/
/*[IF JAVA_SPEC_VERSION >= 24]*/
ComponentBuilder.create("jdk.management:type=VirtualThreadScheduler", VirtualThreadSchedulerImpls.create()) //$NON-NLS-1$
.addInterface(VirtualThreadSchedulerMXBean.class)
.register(allComponents);
/*[ENDIF] (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES */
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

// register beans with zero or more instances

Expand Down