mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8319462: Signature.ClassTypeSig::classDesc() incorrect for inner class types
Reviewed-by: asotona
This commit is contained in:
parent
541ff7149f
commit
d22e368cb5
2 changed files with 25 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2023, 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
|
||||
|
@ -118,7 +118,9 @@ public sealed interface Signature {
|
|||
|
||||
/** {@return the class name, as a symbolic descriptor} */
|
||||
default ClassDesc classDesc() {
|
||||
return ClassDesc.ofInternalName(className());
|
||||
var outer = outerType();
|
||||
return outer.isEmpty() ? ClassDesc.ofInternalName(className())
|
||||
: outer.get().classDesc().nested(className());
|
||||
}
|
||||
|
||||
/** {@return the type arguments of the class} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue