mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8331744: java.lang.classfile.TypeKind improvements
Reviewed-by: asotona, redestad
This commit is contained in:
parent
dea8076a58
commit
784b8fce7a
5 changed files with 183 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -56,7 +56,7 @@ public sealed interface NewPrimitiveArrayInstruction extends Instruction
|
|||
*/
|
||||
static NewPrimitiveArrayInstruction of(TypeKind typeKind) {
|
||||
// Implicit null-check:
|
||||
if (typeKind.newarraycode() < 0) {
|
||||
if (typeKind.newarrayCode() < 0) {
|
||||
throw new IllegalArgumentException("Illegal component type: " + typeKind.typeName());
|
||||
}
|
||||
return new AbstractInstruction.UnboundNewPrimitiveArrayInstruction(typeKind);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue