Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8361614 Missing sub-int value validation in the Class-File API
  3. JDK-8361703

Release Note: Class-File API Rejects Unrepresentable Integer Data

XMLWordPrintable

      In the `class` file format, many integer values use a more narrow representation than that representable by the `int` primitive type in the Java programming language. Currently, in the Class-File API, users can provide `int` values that will truncate upon write to `class` file, which means the value won't be preserved when read.

      To prevent such error-prone usage, the Class-File API now performs eager validation of such int values, including the size of lists. Such unrepresentable data will result in an IllegalArgumentException. Users who used such silent truncation should migrate to explicit truncation before passing data instead.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: