Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902549

Asmtools processes Runtime{In}VisibleTypeAnnotations incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • asm_tools_7.0
    • asm_tools_7.0
    • tools
    • None
    • b02

      If a class file contains RuntimeVisibleTypeAnnotations then jdec tool produces jcod file which has a wrong structure and can't be converted to the same class file. A new class file is longer than the old one.

      A new class file causes the following:

      ...
              Attr(#26) { // RuntimeVisibleTypeAnnotations
                [] { // annotations
                  { // type_annotation
                    0x13; // target_type: FIELD
                    [] { // type_paths
                    }
                    #0;
                    [] { // element_value_pairs
                      { // element value pair
                        #256;
                        { // element_value
                          0x1C; // invalid element_value
                        } // element_value
                      } // element value pair
                      ;
                    } // element_value_pairs
                  } // type_annotation
                }
      // ======== attribute array started at 0x0348 has 3 bytes more:
                0x73001D;
              } // end RuntimeVisibleTypeAnnotations
            } // Attributes
          }
        } // Fields

      //------- ClassFormatError: invalid element_value
        0x000500010005001E;
        0x0003001F00000016;
        0x000200020000000A;
        0x2AB700012A1BB500;
        0x07B1000000000020;
        0x0000000501000B00;
        0x00001A0000000F00;
        0x0116000000001B00;
        0x01001C73001D0001;
        0x001000210001001F;
        0x0000001300010001;
        0x000000072ABA000E;
        0x0000B00000000000;
        0x1100140022000100;
        0x1F00000013000100;
        0x01000000072ABA00;
        0x120000AC00000000;
        0x0011001800230001;
        0x001F000000140002;
        0x0002000000082A2B;
        0xBA00160000AC0000;
        0x00000001000B0022;
        0x0002001F00000011;
        0x0001000100000005;
        0x2AB4000DAC000000;
        0x0000240000000B00;
        0x01001B0001001C73;
        0x001D000400250000;
        0x0002002600270000;
        0x001C0001000B000C;
        0x0001001A0000000E;
        0x0001130000001B00;
        0x01001C73001D0028;
        0x0000000C00010029;
        0x0003000800300031;
        0x00320000000A0001;
        0x0033003500370019;
      } // end class point


        

            lkuskov Leonid Kuskov
            lkuskov Leonid Kuskov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: