Skip to content

Commit

Permalink
Valhalla still uses static Class<?> getPrimitiveClass(String name)
Browse files Browse the repository at this point in the history
Valhalla extension repo has no latest openjdk change to use static <T>
Class<T> getPrimitiveClass(String name).

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
  • Loading branch information
JasonFengJ9 committed Oct 30, 2024
1 parent 3974d87 commit a0a83d7
Showing 1 changed file with 6 additions and 6 deletions.
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]*/
/*[IF (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES]*/
@SuppressWarnings("unchecked")
static <T> Class<T> getPrimitiveClass(String name)
/*[ELSE] JAVA_SPEC_VERSION >= 24 */
/*[ELSE] (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES */
static Class<?> getPrimitiveClass(String name)
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
/*[ENDIF] (JAVA_SPEC_VERSION >= 24) & !INLINE-TYPES */
{
Class<?> type;

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

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

/**
Expand Down

0 comments on commit a0a83d7

Please sign in to comment.