classfile: model RuntimeVisible/InvisibleParameterAnnotations (fixes ASM AIOOBE on write)
Parameter annotations were unmodeled and fell through to Raw with stale constant-pool indices after the pool rebuild. ASM (Paper converter, Fabric mixin transformer) then failed with ArrayIndexOutOfBoundsException in readParameterAnnotations. Now parsed and rewritten like class-level annotations.
This commit is contained in:
parent
045cd3ed9c
commit
b73c72d56d
5 changed files with 80 additions and 1 deletions
|
|
@ -48,6 +48,12 @@ pub enum Attribute {
|
|||
RuntimeVisibleAnnotations(Vec<Annotation>),
|
||||
/// `RuntimeInvisibleAnnotations` (JVMS §4.7.17): CLASS-retention ones.
|
||||
RuntimeInvisibleAnnotations(Vec<Annotation>),
|
||||
/// `RuntimeVisibleParameterAnnotations` (JVMS §4.7.18): per-parameter
|
||||
/// annotations. Parsed like the class-level ones - raw pool indices go
|
||||
/// stale when the pool is rebuilt.
|
||||
RuntimeVisibleParameterAnnotations(Vec<Vec<Annotation>>),
|
||||
/// `RuntimeInvisibleParameterAnnotations` (JVMS §4.7.19).
|
||||
RuntimeInvisibleParameterAnnotations(Vec<Vec<Annotation>>),
|
||||
/// Everything else: name + raw `info` bytes (careful with pool indices).
|
||||
Raw {
|
||||
name: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue