Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8259764

Blob "getBytes" method is limited to Integer.MAX_VALUE

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE PROBLEM :
      Current interface is as follows:
      byte[] getBytes(long pos, int length) throws SQLException

      So this means that "length" is limited by the "int" type.

      See:
      https://docs.oracle.com/javase/8/docs/api/java/sql/Blob.html#getBytes-long-int-


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Deprecate getBytes(long, int) and add a new method getBytes(long, long)
      ACTUAL -
      Blob length is a long, so sometimes you end up with invalid lengths

      FREQUENCY : always


        Attachments

          Activity

            People

            Assignee:
            lancea Lance Andersen
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: