jdk-24/test/langtools/tools/javac/classreader/8215407/UnrelatedClass.jcod
Jan Lahoda ae5972a204 8215407: javac should reject class files with bad EnclosingMethod attributes
Reject classfiles with broken EnclosingMethod attribute.

Reviewed-by: jjg
2019-04-11 14:49:04 +02:00

102 lines
2.2 KiB
Plaintext

class UnrelatedClass {
0xCAFEBABE;
0; // minor version
52; // version
[] { // Constant Pool
; // first element is empty
Method #5 #14; // #1
class #15; // #2
Method #2 #16; // #3
class #17; // #4
class #18; // #5
Utf8 "InnerClasses"; // #6
Utf8 "<init>"; // #7
Utf8 "()V"; // #8
Utf8 "Code"; // #9
Utf8 "LineNumberTable"; // #10
Utf8 "t"; // #11
Utf8 "SourceFile"; // #12
Utf8 "Enclosing.java"; // #13
NameAndType #7 #8; // #14
Utf8 "Enclosing$1"; // #15
NameAndType #7 #19; // #16
Utf8 "UnrelatedClass"; // #17
Utf8 "java/lang/Object"; // #18
Utf8 "(LUnrelatedClass;)V"; // #19
} // Constant Pool
0x0021; // access
#4;// this_cpx
#5;// super_cpx
[] { // Interfaces
} // Interfaces
[] { // fields
} // fields
[] { // methods
{ // Member
0x0001; // access
#7; // name_cpx
#8; // sig_cpx
[] { // Attributes
Attr(#9) { // Code
1; // max_stack
1; // max_locals
Bytes[]{
0x2AB70001B1;
}
[] { // Traps
} // end Traps
[] { // Attributes
Attr(#10) { // LineNumberTable
[] { // LineNumberTable
0 1;
}
} // end LineNumberTable
} // Attributes
} // end Code
} // Attributes
} // Member
;
{ // Member
0x0001; // access
#11; // name_cpx
#8; // sig_cpx
[] { // Attributes
Attr(#9) { // Code
3; // max_stack
1; // max_locals
Bytes[]{
0xBB0002592AB70003;
0x57B1;
}
[] { // Traps
} // end Traps
[] { // Attributes
Attr(#10) { // LineNumberTable
[] { // LineNumberTable
0 3;
9 4;
}
} // end LineNumberTable
} // Attributes
} // end Code
} // Attributes
} // Member
} // methods
[] { // Attributes
Attr(#12) { // SourceFile
#13;
} // end SourceFile
;
Attr(#6) { // InnerClasses
[] { // InnerClasses
#2 #0 #0 0;
}
} // end InnerClasses
} // Attributes
} // end class UnrelatedClass