@@ -629,7 +629,7 @@ impl ClassReader {
629
629
let n = reader. get_u16 ( ) ;
630
630
( 0 ..n) . map ( |_| ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) . collect ( )
631
631
} ) ) ,
632
- "InnerClass " => Some ( Attribute :: InnerClass ( {
632
+ "InnerClasses " => Some ( Attribute :: InnerClasses ( {
633
633
let n = reader. get_u16 ( ) ;
634
634
( 0 ..n) . map ( |_| InnerClass {
635
635
inner_class_info_index : ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ,
@@ -643,7 +643,7 @@ impl ClassReader {
643
643
"Signature" => Some ( Attribute :: Signature ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ) ,
644
644
"SourceFile" => Some ( Attribute :: SourceFile ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ) ,
645
645
"SourceDebugExtension" => Some ( Attribute :: SourceDebugExtension ( reader. get_bytes ( ) ) ) ,
646
- "LineNumberTable" => Some ( Attribute :: LineNumbeTable ( {
646
+ "LineNumberTable" => Some ( Attribute :: LineNumberTable ( {
647
647
let n = reader. get_u16 ( ) ;
648
648
( 0 ..n) . map ( |_| LineNumberTable {
649
649
start_pc : reader. get_u16 ( ) ,
@@ -660,9 +660,9 @@ impl ClassReader {
660
660
index : reader. get_u16 ( )
661
661
} ) . collect ( )
662
662
} ) ) ,
663
- "LocalVariableTypeTable" => Some ( Attribute :: LocalVariableTableType ( {
663
+ "LocalVariableTypeTable" => Some ( Attribute :: LocalVariableTypeTable ( {
664
664
let n = reader. get_u16 ( ) ;
665
- ( 0 ..n) . map ( |_| LocalVariableTableType {
665
+ ( 0 ..n) . map ( |_| LocalVariableTypeTable {
666
666
start_pc : reader. get_u16 ( ) ,
667
667
length : reader. get_u16 ( ) ,
668
668
name_index : ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ,
@@ -792,15 +792,15 @@ impl ClassReader {
792
792
let tag = reader. get_u8 ( ) ;
793
793
794
794
match tag {
795
- 66 /* B */ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
796
- 67 /* C */ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
797
- 68 /* D */ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
798
- 70 /* F */ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
799
- 73 /* I */ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
800
- 74 /* J */ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
801
- 83 /* S */ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
802
- 90 /* Z */ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
803
- 115 /* s */ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
795
+ 66 /* B */ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
796
+ 67 /* C */ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
797
+ 68 /* D */ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
798
+ 70 /* F */ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
799
+ 73 /* I */ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
800
+ 74 /* J */ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
801
+ 83 /* S */ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
802
+ 90 /* Z */ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
803
+ 115 /* s */ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ) ,
804
804
101 /* e */ => ElementValue :: Enum {
805
805
type_name_index : ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) ,
806
806
const_name_index : ConstantPoolIndex :: new ( reader. get_u16 ( ) as usize ) } ,
@@ -810,7 +810,7 @@ impl ClassReader {
810
810
let n = reader. get_u16 ( ) ;
811
811
( 0 ..n) . map ( |_| ClassReader :: read_element_value ( reader) ) . collect ( )
812
812
} ) ,
813
- _ => ElementValue :: ConstantValue ( ConstantPoolIndex :: new ( 0 ) ) // TODO this deserves a better error handling
813
+ _ => ElementValue :: ConstantValue ( tag , ConstantPoolIndex :: new ( 0 ) ) // TODO this deserves a better error handling
814
814
}
815
815
}
816
816
0 commit comments