mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8331264: Reduce java.lang.constant initialization overhead
Reviewed-by: liach, mchung
This commit is contained in:
parent
60b61e588c
commit
0630bb02eb
7 changed files with 69 additions and 67 deletions
|
@ -270,7 +270,7 @@ public sealed interface ClassDesc
|
|||
* @return whether this {@linkplain ClassDesc} describes an array type
|
||||
*/
|
||||
default boolean isArray() {
|
||||
return descriptorString().startsWith("[");
|
||||
return descriptorString().charAt(0) == '[';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -288,7 +288,7 @@ public sealed interface ClassDesc
|
|||
* @return whether this {@linkplain ClassDesc} describes a class or interface type
|
||||
*/
|
||||
default boolean isClassOrInterface() {
|
||||
return descriptorString().startsWith("L");
|
||||
return descriptorString().charAt(0) == 'L';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue