harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang" <zhanghuang...@gmail.com>
Subject [classlib][sql] SerialClob.setAsciiStream/setCharacterStream should throw SerialException if it's instantiated with a char array
Date Fri, 23 Mar 2007 20:45:44 GMT
Hi folks,

RI behaves strangely of SerialClob.setAsciiStream/setCharacterStream,
consider:

   public void testSetAsciiStream() throws Exception {
        SerialClob serialClob = new SerialClob("helloo".toCharArray());
        serialClob.setAsciiStream(1);
    }

    public void testSetCharacterStream() throws Exception {
        SerialClob serialClob = new SerialClob("helloo".toCharArray());
        serialClob.setCharacterStream(1);
    }

As spec says "If this SerialClob object is instantiated with a char array, a
SerialException object is thrown." But both test cases throw
NullPointerException. Can we regard it as RI's bug?

Thanks!
-- 
Best regards,
Andrew Zhang

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message