Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-2971

[classlib][sql] SerialBlob.setBinaryStream should throw SerialException if it's instantiated by byte buffer.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      The spec of SerialBlob.setBinaryStream says "throws SerialException - if the SerialBlob in not instantiated with a Blob object that supports setBinaryStream()". So if the SerialBlob is instantiated with a byte buffer, it's supposed to throw SerialException. But following test shows that RI throws NullPointerException instead:
      public void testSetBinaryStreamJ() throws Exception {
      byte[] buf =

      { 1, 2, 3, 4, 5, 6, 7, 8 }

      ;
      SerialBlob serialBlob = new SerialBlob(buf);
      serialBlob.setBinaryStream(1);
      }

      As discussed in dev mailing list, Harmony will comply with spec, and won't follow RI for this case.

      Best regards,
      Andrew

      Attachments

        Activity

          People

            tellison Tim Ellison
            zhanghuangzhu Zhang Huang Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: